Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception #21

Closed
Phazeshift opened this issue Jan 16, 2013 · 2 comments
Closed

Unhandled exception #21

Phazeshift opened this issue Jan 16, 2013 · 2 comments
Labels

Comments

@Phazeshift
Copy link

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)

@marceldev89
Copy link
Owner

Thanks, missed that one. :)

@Paronity
Copy link

Was just coming to post this one as I just ran into it consistently on my new server when it's at capacity. Same fix on my end took care of it.

marceldev89 added a commit that referenced this issue Jan 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants