mirror of
https://github.com/soheilhy/cmux.git
synced 2024-11-09 19:21:52 +08:00
Change connection closed string in tests.
Go 1.8 and 1.9 use different text for the connection closed error. Use their common prefix (i.e., "use of closed") in the tests for them to pass on all Go versions. Go 1.8: "use of closed network connection" Go 1.9: "use of closed file or network connection" Suggested-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
bf4a8ede9e
commit
210139db95
@ -42,7 +42,7 @@ const (
|
||||
)
|
||||
|
||||
func safeServe(errCh chan<- error, muxl CMux) {
|
||||
if err := muxl.Serve(); !strings.Contains(err.Error(), "use of closed network connection") {
|
||||
if err := muxl.Serve(); !strings.Contains(err.Error(), "use of closed") {
|
||||
errCh <- err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user