mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-06 21:13:37 -04:00
Changed TCPServer to guarantee sending of all input data, unless there's an exception
This commit is contained in:
@@ -125,7 +125,9 @@ public class TCPServer {
|
||||
SocketChannel sc = sockets.get(sock);
|
||||
try {
|
||||
if (sc != null && sc.isConnected()) {
|
||||
sc.write(ByteBuffer.wrap(data));
|
||||
ByteBuffer bb = ByteBuffer.wrap(data);
|
||||
while (bb.hasRemaining())
|
||||
sc.write(bb);
|
||||
return true;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user