Socket server crashing: An existing connection was forcibly closed by the remote host
Hey all!
Been awhile. Socket server crashes sporatically with this exception through on the AppDomain level:
An existing connection was forcibly closed by the remote host
It's thrown via this code:
Code:
Dim cd As AppDomain = AppDomain.CurrentDomain
AddHandler cd.UnhandledException, AddressOf UnexpectedExceptionHandler
BTW, this is an asynchronous socket server created in .NET 2.0 using VB.NET. Each user's incoming text (OnReceivedData), is wrapped in a Try/Catch, so exceptions caught there (bad formatting, bad data, disconnection, etc.), will be caught and promptly disconnect the user.
I do have timers that run as well, would they possibly be a problem?
The problem I have is above (An existing connection was forcibly closed by the remote host), which causes the server to crash. I don't know where to begin to look for this issue.
Thanks all! Let me know if you need more information. This one has eluded me for some time.
Re: Socket server crashing: An existing connection was forcibly closed by the remote host
Update:
I've wrapped the timer threads in Try/Catchs, and the user threads have Try/Catches, and I'm still getting this exception. Any idea where it could be coming from?