Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inbound read all data when outbound uplink timeout #1086

Closed
wants to merge 0 commits into from

Conversation

beyondkmp
Copy link

No description provided.

@DarienRaymond
Copy link
Contributor

Please describe in detail what you want to achieve.

@beyondkmp
Copy link
Author

beyondkmp commented May 3, 2018

pipe.writer数据全部发送完成后,会再在inbound里面关闭。回源的数据速度非常快,缓存了,如果在uplink timeout时间内还没有发送完缓存数据,就直接closeerror,会出现很多下载到90%多的情况就断流的情况。

@DarienRaymond
Copy link
Contributor

在通常情况下(如HTTP),uplink不会在downlink关闭之前关闭,当uplink提前关闭时,要么连接真的出了问题(比如客户端关掉了浏览器),要么是某种特殊协议,需要具体分析。

如果你观察到断流的情况,应该是在其它地方出了bug,不是这里。

@beyondkmp
Copy link
Author

beyondkmp commented May 3, 2018

#1082 这个断流的是能重现的,有空可以帮忙看下。如果按这个pull修改后,基本就不会断流了。初次看v2ray的代码,不是很理解,有个问题要请教下,如果服务端与源站的速度非常快,下载完成了,并缓存了10M,然后源站断开了,这里服务端应该是会在uplink timeout后断开, 但是客户端到服务端的速度非常慢,在uplink timeout并没有下载缓存的数据,这样就会产生断流。错误日志如下:

2018/04/28 17:04:24 [Info] [1634727360] App|Proxyman|Outbound: failed to process outbound traffic > Proxy|Freedom: connection ends > context canceled
2018/04/28 17:04:37 [Info] [1634727360] App|Proxyman|Inbound: connection ends > Proxy|VMess|Inbound: connection ends > io: read/write on closed pipe

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

Successfully merging this pull request may close these issues.

None yet

2 participants