mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Fixed issue where packets might be sent to a disconnected client
This commit is contained in:
parent
804e8373d5
commit
ffda38c9fd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user