Closed swq123459 closed 1 year ago
UDP or TCP socket?
udp还是tcp socket?
TRANS_BY_GITHUB_AI_ASSISTANT
tcp didn't find this problem:
tcp并没发现这个问题:
TRANS_BY_GITHUB_AI_ASSISTANT
tcp
Previously, after calling the interfaces related to peer_port
and peer_ip
, the data would be cached. Now, this logic is removed.
Because the closeSocket
operation is placed after onError
.
之前调用peer_port和peer_ip相关接口后 会把数据缓存下来 现在去掉这个逻辑。 因为先closeSocket操作放在onError之后了
TRANS_BY_GITHUB_AI_ASSISTANT
Is that the expected behavior?
那就是预期行为吗
TRANS_BY_GITHUB_AI_ASSISTANT
那就是预期行为吗
No, you can get the peer IP address when triggering onError and the Session destructor. As long as the socket fd is valid, you can get it.
那就是预期行为吗
不是啊 触发onError以及Seession的析构函数时 都是可以获取到对端ip信息的 只要socket fd有效 都能获取到
TRANS_BY_GITHUB_AI_ASSISTANT
I can reproduce this here. Based on your description, I'll see if I can describe it more clearly.
我这里可以必现,根据你的描述,我看能不能描述更清楚一些
TRANS_BY_GITHUB_AI_ASSISTANT
This is caused by receiving a TCP reset, which results in EOF not having this problem. This bug has been fixed. Please check the latest code.
这个是收到tcp reset时导致的 eof没这个问题,这个bug已经修复了 请查看最新代码
TRANS_BY_GITHUB_AI_ASSISTANT
Thanks for the feedback!
感谢反馈!
TRANS_BY_GITHUB_AI_ASSISTANT
dd1d308bd01a3aab038a87b938013be39134e1c1 Starting from this commit (including this commit), peer_port and peer_ip cannot be obtained. This was discovered while using zlmediakit and later traced back to this branch.
TRANS_BY_GITHUB_AI_ASSISTANT