shadowsocks-go icon indicating copy to clipboard operation
shadowsocks-go copied to clipboard

bug报告:shadowsocks-server/server.go

Open archer-bao opened this issue 6 years ago • 4 comments

在阅读shadowsocks-server/server.go中的源码时,发现函数 func handleConnection(conn *ss.Conn, port string) 中第一个defer函数中关于连接的关闭判断逻辑疑似出现笔误?若调用getRequest(conn)处理请求出错,则handleConnection( )函数终止返回,此时根据现有defer函数中的逻辑,不会释放tcp连接,使得服务器的socket一直处于 CLOSE_WAIT 状态,另外紧随其后的 host主机域名的处理也存在同样的问题。 请关注该文件https://github.com/shadowsocks/shadowsocks-go/blob/master/cmd/shadowsocks-server/server.go 中第132行、140行、146行、159行、162行、179行。

archer-bao avatar Dec 10 '18 06:12 archer-bao

you can patch it with a pull request

arthurkiller avatar Dec 10 '18 06:12 arthurkiller

我已经fork了一份并对其做了个人修改,已经脱离了,所以可能不能再做pull request了。

archer-bao avatar Dec 10 '18 06:12 archer-bao

Doesn't matter. You can request to pull on a new branch.

arthurkiller avatar Dec 10 '18 06:12 arthurkiller

thanks for your reminding, let me have a try : )

archer-bao avatar Dec 10 '18 06:12 archer-bao