*: fix go vet reported issues

This commit is contained in:
Cong Ding
2015-08-22 12:07:53 -05:00
parent 044b23c3ca
commit c09b667d57
6 changed files with 5 additions and 8 deletions

View File

@ -35,12 +35,10 @@ func (ph *PauseableHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
hj, ok := w.(http.Hijacker)
if !ok {
panic("webserver doesn't support hijacking")
return
}
conn, _, err := hj.Hijack()
if err != nil {
panic(err.Error())
return
}
conn.Close()
}