Closed hunshcn closed 6 months ago
大致逻辑: 在 bind 连接成功建立之后 client <-> (gost: pc1 <-> pc2) <-> server
client <-> pc1 和 pc2 <-> server 直接的 <-> 均为双向 io.Copy
client <-> pc1
pc2 <-> server
当 pc2 <-> server 连接断开,pc2 需要手动关闭。否则若 client <-> pc1 在极低速网络中,这两者之间的双向 io.Copy 有较大可能处在 pc1.Write() 和 pc1.Read(),此时 pc2 <-> server 连接断开,pc2 未被 close,pc1 的 write 和 read 将永远 hang 住。
pc1.Write()
pc1.Read()
pc2在创建后已经derfer Close: https://github.com/ginuerzh/gost/pull/999/files#diff-18b9afacb495197e1b5c640d4a93c03be85e3c7eb5669150ad3caf4bce5dad10R1080
..确实,抱歉没看到
大致逻辑: 在 bind 连接成功建立之后 client <-> (gost: pc1 <-> pc2) <-> server
client <-> pc1
和pc2 <-> server
直接的 <-> 均为双向 io.Copy当
pc2 <-> server
连接断开,pc2 需要手动关闭。否则若client <-> pc1
在极低速网络中,这两者之间的双向 io.Copy 有较大可能处在pc1.Write()
和pc1.Read()
,此时pc2 <-> server
连接断开,pc2 未被 close,pc1 的 write 和 read 将永远 hang 住。