smallnest / rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
https://rpcx.io
Other
8.11k stars 1.17k forks source link

server plugin 的 HandleConnAccept 处理连接的问题 #777

Closed im3ott closed 1 year ago

im3ott commented 1 year ago

使用 goroutine 调用 server.Serve 后,在 HandleConnAccept 方法中,若返回 false,于 https://github.com/smallnest/rpcx/blob/b46ab77f3a4019a350529eb377e8ee457137b4f5/server/server.go#L260 会返回 Error(timeout: no recent network activity) 导致 Server 退出监听,应该如何处理呢?用 BlacklistPlugin 即可复现

smallnest commented 1 year ago

不会导致退出监听,只是不接受这个ip的链接而已。

image
smallnest commented 1 year ago

see the example: https://github.com/rpcxio/rpcx-examples/tree/master/plugin_blacklist