Skip to content

Unhandled exception #21

@Phazeshift

Description

@Phazeshift

I've found that BattlEyeClient will occasionally throw an unhandled ObjectDisposedException in the Receive method, caused by accessing socket.Available when the socket has been disconnected.

I think this happens when the timeoutServer value causes Disconnect to be called, which closes the socket and the receive thread then continues and calls socket.Available. I fixed it by adding another check of Socket.Connected:

if (socket.Connected && packetQueue.Count > 0 && socket.Available == 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions