Skip to content

why does opening dev console in http example crash the server? #498

@G2G2G2G

Description

@G2G2G2G

https://github.com/pion/mediadevices/tree/master/examples/http

./http :12345
listening on :12345
2023/05/04 09:28:47 http: panic serving 127.0.0.1:32782: write tcp 127.0.0.1:12345->127.0.0.1:32782: write: broken pipe
goroutine 6 [running]:
net/http.(*conn).serve.func1()
	/usr/lib/go/src/net/http/server.go:1854 +0xbf
panic({0x6bd660, 0xc00009a5a0})
	/usr/lib/go/src/runtime/panic.go:890 +0x263
main.must(...)
	/storage/1/projects/git/mediadevices/examples/http/main.go:27
main.main.func2({0x77aea0?, 0xc0001b8000}, 0xffffffffffffffff?)
	/storage/1/projects/git/mediadevices/examples/http/main.go:79 +0x4ec
net/http.HandlerFunc.ServeHTTP(0xc000035680?, {0x77aea0?, 0xc0001b8000?}, 0x40f4a8?)
	/usr/lib/go/src/net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x77aea0, 0xc0001b8000}, 0xc000194a00)
	/usr/lib/go/src/net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc0001848a0?}, {0x77aea0, 0xc0001b8000}, 0xc000194a00)
	/usr/lib/go/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0000f4240, {0x77b038, 0xc0001847b0})
	/usr/lib/go/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	/usr/lib/go/src/net/http/server.go:3089 +0x5ed
2023/05/04 09:28:48 http: panic serving 127.0.0.1:34362: write tcp 127.0.0.1:12345->127.0.0.1:34362: write: broken pipe
goroutine 50 [running]:
net/http.(*conn).serve.func1()
	/usr/lib/go/src/net/http/server.go:1854 +0xbf
panic({0x6bd660, 0xc00009a690})
	/usr/lib/go/src/runtime/panic.go:890 +0x263
main.must(...)
	/storage/1/projects/git/mediadevices/examples/http/main.go:27
main.main.func2({0x77aea0?, 0xc0001b80e0}, 0xffffffffffffffff?)
	/storage/1/projects/git/mediadevices/examples/http/main.go:79 +0x4ec
net/http.HandlerFunc.ServeHTTP(0xc0002ee680?, {0x77aea0?, 0xc0001b80e0?}, 0x40f4a8?)
	/usr/lib/go/src/net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x77aea0, 0xc0001b80e0}, 0xc000194000)
	/usr/lib/go/src/net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0xc000184030?}, {0x77aea0, 0xc0001b80e0}, 0xc000194000)
	/usr/lib/go/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0000f41b0, {0x77b038, 0xc0001847b0})
	/usr/lib/go/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	/usr/lib/go/src/net/http/server.go:3089 +0x5ed
^C⏎                                                                      

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions