panic "no such host" #16
Owner
```
May 18 13:14:06 drpork chrobroprint[570638]: Post "http://brn30055cb5e3ae.local:631/ipp/print": dial tcp: lookup brn30055cb5e3ae.local: no such hostPost "http:/>
May 18 13:14:06 drpork chrobroprint[570638]: goroutine 12 [running]:
May 18 13:14:06 drpork chrobroprint[570638]: net/http.(*conn).serve.func1(0xc0002d00a0)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:1824 +0x153
May 18 13:14:06 drpork chrobroprint[570638]: panic(0x6ed7a0, 0x938150)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/runtime/panic.go:971 +0x499
May 18 13:14:06 drpork chrobroprint[570638]: main.handleGetJobs(0xc000316020, 0x7fd90000000a, 0x74a38b)
May 18 13:14:06 drpork chrobroprint[570638]: /home/henrik/work/ippserver/proxy/handlegetjobs.go:33 +0x45a
May 18 13:14:06 drpork chrobroprint[570638]: main.handle(0x7ae2e0, 0xc00031a000, 0xc000302000)
May 18 13:14:06 drpork chrobroprint[570638]: /home/henrik/work/ippserver/proxy/main.go:64 +0x390
May 18 13:14:06 drpork chrobroprint[570638]: net/http.HandlerFunc.ServeHTTP(0x75eac0, 0x7ae2e0, 0xc00031a000, 0xc000302000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:2069 +0x44
May 18 13:14:06 drpork chrobroprint[570638]: net/http.(*ServeMux).ServeHTTP(0x945260, 0x7ae2e0, 0xc00031a000, 0xc000302000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:2448 +0x1ad
May 18 13:14:06 drpork chrobroprint[570638]: net/http.serverHandler.ServeHTTP(0xc00010a000, 0x7ae2e0, 0xc00031a000, 0xc000302000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:2887 +0xa3
May 18 13:14:06 drpork chrobroprint[570638]: net/http.(*conn).serve(0xc0002d00a0, 0x7ae820, 0xc000056900)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:1952 +0x8cd
May 18 13:14:06 drpork chrobroprint[570638]: created by net/http.(*Server).Serve
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:3013 +0x39b
May 18 13:14:06 drpork chrobroprint[570638]: 2021/05/18 13:14:06 http: panic serving 192.168.0.108:36436: runtime error: invalid memory address or nil pointer d>
May 18 13:14:06 drpork chrobroprint[570638]: goroutine 9 [running]:
May 18 13:14:06 drpork chrobroprint[570638]: net/http.(*conn).serve.func1(0xc0002d0000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:1824 +0x153
May 18 13:14:06 drpork chrobroprint[570638]: panic(0x6ed7a0, 0x938150)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/runtime/panic.go:971 +0x499
May 18 13:14:06 drpork chrobroprint[570638]: main.handlePrintJob(0xc000140140, 0x7fd996579008, 0xc00013e560, 0x7fd900000008, 0xc00013e560)
May 18 13:14:06 drpork chrobroprint[570638]: /home/henrik/work/ippserver/proxy/handleprintjob.go:45 +0x73d
May 18 13:14:06 drpork chrobroprint[570638]: main.handle(0x7ae2e0, 0xc00010a1c0, 0xc000142000)
May 18 13:14:06 drpork chrobroprint[570638]: /home/henrik/work/ippserver/proxy/main.go:62 +0x348
May 18 13:14:06 drpork chrobroprint[570638]: net/http.HandlerFunc.ServeHTTP(0x75eac0, 0x7ae2e0, 0xc00010a1c0, 0xc000142000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:2069 +0x44
May 18 13:14:06 drpork chrobroprint[570638]: net/http.(*ServeMux).ServeHTTP(0x945260, 0x7ae2e0, 0xc00010a1c0, 0xc000142000)
May 18 13:14:06 drpork chrobroprint[570638]: /usr/local/go/src/net/http/server.go:2448 +0x1ad
May 18 13:14:06 drpork chrobroprint[570638]: net/http.serverHandler.ServeHTTP(0xc00010a000, 0x7ae2e0, 0xc00010a1c0, 0xc000142000)
```
Avoid panic if printer is off or unreachable for some reason.
Avoid panic if printer is off or unreachable for some reason. #18
Avoid panic if printer is off or unreachable for some reason.
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?