什么会对 TCPSocket 进行写调用无限期挂起?
lotsOfBytes = # a really large number of bytes, like 1 or 2 MB of data
socket = TCPSocket.new # some config
socket.write(lotsOfBytes) # this line hangs
我正在尝试 debug an issue其中发送到带有大量键的 memcached 的 get_multi
操作无限期挂起,并且它在 line that resembles 上也是如此。那个代码片段。我试图更好地了解构建此库的低级套接字的预期工作方式。
最佳答案
您的 TCPSocket 上的以下属性的值是什么:
如果您要执行 Wireshark 转储,那么在挂起连接之前看看会发生什么会好得多。
https://stackoverflow.com/questions/68218602/