Fix syntax. See #342
This commit is contained in:
parent
7691d79de6
commit
ed538209e5
@ -73,21 +73,17 @@ public class DefaultSslBufferPool implements SslBufferPool {
|
||||
return index * MAX_PACKET_SIZE;
|
||||
}
|
||||
|
||||
public ByteBuffer acquireBuffer() {
|
||||
synchronized {
|
||||
if (index == 0) {
|
||||
return ByteBuffer.allocate(MAX_PACKET_SIZE);
|
||||
} else {
|
||||
return (ByteBuffer) pool[-- index].clear();
|
||||
}
|
||||
public synchronized ByteBuffer acquireBuffer() {
|
||||
if (index == 0) {
|
||||
return ByteBuffer.allocate(MAX_PACKET_SIZE);
|
||||
} else {
|
||||
return (ByteBuffer) pool[-- index].clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void releaseBuffer(ByteBuffer buffer) {
|
||||
synchronized {
|
||||
if (index < maxBufferCount) {
|
||||
pool[index ++] = buffer;
|
||||
}
|
||||
public synchronized void releaseBuffer(ByteBuffer buffer) {
|
||||
if (index < maxBufferCount) {
|
||||
pool[index ++] = buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user