客户端没设置timeout及rst

客户端请求,服务器已经无响应

客户端block

服务器restart,linux kill connection and send RST

客户端connection reset,证明客户端在读,服务器tomcat仍然接受了连接,所以最应当设置socket timeout

 

如果对方服务器没启动,会直接Connection refused

https://www.cnblogs.com/exmyth/p/8204724.html

  • 服务器返回了“RST”时,如果此时客户端正在从Socket套接字的输出流中读数据则会提示Connection reset”;

  • 服务器返回了“RST”时,如果此时客户端正在往Socket套接字的输入流中写数据则会提示“Connection reset by peer”。

 

posted on 2025-02-14 20:01  silyvin  阅读(14)  评论(0)    收藏  举报