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