Results 1 to 2 of 2

Thread: Socket server crashing: An existing connection was forcibly closed by the remote host

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    31

    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.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    31

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width