This commit is contained in:
@@ -256,7 +256,7 @@ class WebSocketRunner implements Runnable {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (index >= 0) {
|
||||
if (index >= 0) { //ByteBuffer[]统一回收的可以采用此写法
|
||||
channel.write(attachments, index, attachments.length - index, attachments, this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ public final class SncpClient {
|
||||
transport.offerBuffer(attachments[i]);
|
||||
}
|
||||
}
|
||||
if (index == 0) {
|
||||
if (index == 0) { //ByteBuffer[]不统一回收的必须采用此写法分开
|
||||
conn.write(attachments, attachments, this);
|
||||
return;
|
||||
} else if (index > 0) {
|
||||
|
||||
Reference in New Issue
Block a user