hashicorp / yamux

Golang connection multiplexing library
Mozilla Public License 2.0
2.19k stars 232 forks source link

Should we close the session when streams receive window exceeded ? #112

Closed hayden-pan closed 2 years ago

hayden-pan commented 2 years ago

After read about the stream receive window code, I found when a stream's receive window exceeded, the error will cause the session's recvLoop() return and then the session shutdown.

If above is correct, when stream is individual, why a stream's receive window exceeded(usually caused by stream's consumer been stuck) make the session shutdown and then stop all other streams? Can we only close the problem stream and return the error message to it's consumer ?

hayden-pan commented 2 years ago

I have notice that there is a sendWindow indicate the other side stream remain recvWindow. So the only possible of receive window exceeded is a bug? If it is right, I will close this issues.