mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-22 20:48:55 +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 {
|
public void send(Packet packet) throws IOException {
|
||||||
|
if (!socket.isConnected()) return;
|
||||||
WritableByteChannel out = Channels.newChannel(socket.getOutputStream());
|
WritableByteChannel out = Channels.newChannel(socket.getOutputStream());
|
||||||
packet.buffer.mark();
|
packet.buffer.mark();
|
||||||
out.write(packet.buffer);
|
out.write(packet.buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user