An existing connection was forcibly closed by the remote host

后端 未结 12 2116
说谎
说谎 2020-11-22 09:26

I am working with a commercial application which is throwing a SocketException with the message,

An existing connection was forcibly closed by the rem

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 10:08

    This generally means that the remote side closed the connection (usually by sending a TCP/IP RST packet). If you're working with a third-party application, the likely causes are:

    • You are sending malformed data to the application (which could include sending an HTTPS request to an HTTP server)
    • The network link between the client and server is going down for some reason
    • You have triggered a bug in the third-party application that caused it to crash
    • The third-party application has exhausted system resources

    It's likely that the first case is what's happening.

    You can fire up Wireshark to see exactly what is happening on the wire to narrow down the problem.

    Without more specific information, it's unlikely that anyone here can really help you much.

提交回复
热议问题