When ever i login/go to an area which has npcs spawned i get disconnected and get these 2 errors:
Code:
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.rs2.model.players.Player.send(Player.java:239)
at com.rs2.model.npcs.NpcUpdating.update(NpcUpdating.java:71)
at com.rs2.model.World.process(World.java:82)
at com.rs2.Server.cycle(Server.java:195)
at com.rs2.Server.run(Server.java:108)
at java.lang.Thread.run(Unknown Source)
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at com.rs2.net.packet.PacketManager.handleIncomingData(PacketManager.java:107)
at com.rs2.Server.cycle(Server.java:185)
at com.rs2.Server.run(Server.java:108)
at java.lang.Thread.run(Unknown Source)
Player.java Line 239
Code:
public void send(ByteBuffer buffer) {
// Prepare the buffer for writing.
buffer.flip();
try {
// ...and write it!
socketChannel.write(buffer);
} catch (IOException ex) {
ex.printStackTrace();
}
}
(PacketManager.java Line 107
Code:
public static final void handleIncomingData(Player player) {
try {
// Read the incoming data.
if (player.getSocketChannel().read(player.getInData()) == -1) {
player.disconnect();
return;
}
Anyone know how to fix?