Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

bug报告:shadowsocks-server/server.go #455

Open
archer-bao opened this issue Dec 10, 2018 · 4 comments
Open

bug报告:shadowsocks-server/server.go #455

archer-bao opened this issue Dec 10, 2018 · 4 comments

Comments

@archer-bao
Copy link

archer-bao commented Dec 10, 2018

在阅读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行。

@arthurkiller
Copy link
Collaborator

you can patch it with a pull request

@archer-bao
Copy link
Author

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

@arthurkiller
Copy link
Collaborator

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

@archer-bao
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants