mirror of
https://github.com/soheilhy/cmux.git
synced 2026-08-04 03:12:49 +08:00
errcheck
go/src/github.com/soheilhy/cmux/cmux.go:127:13 c.Close()
go/src/github.com/soheilhy/cmux/cmux.go:134:9 c.Close()
go/src/github.com/soheilhy/cmux/cmux.go:137:15 m.root.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:43:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/cmux_test.go:52:20 defer r.Body.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:72:12 s.Register(TestRPCRcvr{})
go/src/github.com/soheilhy/cmux/cmux_test.go:103:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:109:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/cmux_test.go:116:20 defer r.Body.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:125:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:133:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/cmux_test.go:141:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:147:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/example_recursive_test.go:27:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_recursive_test.go:56:12 s.Register(&RecursiveRPCRcvr{})
go/src/github.com/soheilhy/cmux/example_recursive_test.go:88:15 go tlsm.Serve()
go/src/github.com/soheilhy/cmux/example_recursive_test.go:89:12 tcpm.Serve()
go/src/github.com/soheilhy/cmux/example_test.go:30:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:34:9 io.Copy(ws, ws)
go/src/github.com/soheilhy/cmux/example_test.go:41:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:53:12 s.Register(&ExampleRPCRcvr{})
go/src/github.com/soheilhy/cmux/example_test.go:68:13 grpcs.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:97:9 m.Serve()
go/src/github.com/soheilhy/cmux/example_tls_test.go:24:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_tls_test.go:69:9 m.Serve()
go/src/github.com/soheilhy/cmux/matchers.go:151:14 hdec.Write(f.HeaderBlockFragment())
This commit is contained in:
committed by
Soheil Hassas Yeganeh
parent
ec462e9c0e
commit
92a63c4fce
@@ -7,6 +7,7 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/soheilhy/cmux"
|
||||
)
|
||||
@@ -21,7 +22,9 @@ func serveHTTP1(l net.Listener) {
|
||||
s := &http.Server{
|
||||
Handler: &anotherHTTPHandler{},
|
||||
}
|
||||
s.Serve(l)
|
||||
if err := s.Serve(l); err != cmux.ErrListenerClosed {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func serveHTTPS(l net.Listener) {
|
||||
@@ -66,5 +69,7 @@ func Example_bothHTTPAndHTTPS() {
|
||||
go serveHTTP1(httpl)
|
||||
go serveHTTPS(tlsl)
|
||||
|
||||
m.Serve()
|
||||
if err := m.Serve(); !strings.Contains(err.Error(), "use of closed network connection") {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user