Fixed issue where packets might be sent to a disconnected client

This commit is contained in:
Collin Smith 2020-06-04 19:14:08 -07:00
parent 804e8373d5
commit ffda38c9fd

View File

@ -693,6 +693,7 @@ public class D2GS extends ApplicationAdapter {
}
public void send(Packet packet) throws IOException {
if (!socket.isConnected()) return;
WritableByteChannel out = Channels.newChannel(socket.getOutputStream());
packet.buffer.mark();
out.write(packet.buffer);