2
0
mirror of https://github.com/soheilhy/cmux.git synced 2026-08-18 23:37:01 +08:00
Files
cmux/cmux_test.go
Soheil Hassas Yeganeh 89dd8ce1fd Return an error in Accept() when root is closed.
As reported in #4, when the root listener is closed, calling Accept
on mux'd listeners would block forever, instead of returning an error.
This is because of a bug introduced in b90740d.

This commit fixes #4 by selecting on both donec and connc of muxed
listeners.

Added a test case to guard against this issue.
2015-12-19 22:28:37 -05:00

3.2 KiB