tcp_fin_timeout

node2:/root/test#sysctl -w net.ipv4.tcp_fin_timeout="1"
net.ipv4.tcp_fin_timeout = 1
node2:/root/test#time python close1.py 
Traceback (most recent call last):
  File "close1.py", line 9, in <module>
    s.recv(999)
socket.timeout: timed out

real	0m10.042s
user	0m0.019s
sys	0m0.010s

tcp_fin_timeout:這個參數表示當服務器主動關閉連接時,socket保持在FIN-WAIT-2狀 態的最大時間。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章