mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Fixed issue where packets might be sent to a disconnected client
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user