Skip to content

Chapte 10: implement correct player disconnect mechanism #2

@kalimatas

Description

@kalimatas

Now there is an exception when a player disconnects from the server:

java.io.IOException: Broken pipe
    at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
    at sun.nio.ch.IOUtil.write(IOUtil.java:65)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
    at com.github.kalimatas.c10_Network.Network.PacketReaderWriter.send(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer.sendToAll(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer.updateClientState(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer.tick(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer.executionThread(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer.access$100(Unknown Source)
    at com.github.kalimatas.c10_Network.GameServer$1.run(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions