aboutsummaryrefslogtreecommitdiff
path: root/nexgb/cookie.go
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2015-04-26 19:04:54 -0400
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:24 +0200
commit5451e59f884298fdf97ef4420a7bc1001093c3b7 (patch)
treed205e50500bb56003ce3116b15942d9853d4884a /nexgb/cookie.go
parentdd00568d44383890cff03d566c014252e096fbfc (diff)
downloadhaven-5451e59f884298fdf97ef4420a7bc1001093c3b7.tar.gz
haven-5451e59f884298fdf97ef4420a7bc1001093c3b7.tar.xz
haven-5451e59f884298fdf97ef4420a7bc1001093c3b7.zip
Remove panics/fatal errors.
Fixes #9. This makes shutdown a little more graceful, but there's more work to be done here. Namely, all outstanding cookies need to be given the error, otherwise they will block forever.
Diffstat (limited to 'nexgb/cookie.go')
-rw-r--r--nexgb/cookie.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/nexgb/cookie.go b/nexgb/cookie.go
index 6b1e4fb..d5cdb29 100644
--- a/nexgb/cookie.go
+++ b/nexgb/cookie.go
@@ -99,7 +99,6 @@ func (c Cookie) replyChecked() ([]byte, error) {
case err := <-c.errorChan:
return nil, err
}
- panic("unreachable")
}
// replyUnchecked waits for a response on either the replyChan or pingChan
@@ -123,7 +122,6 @@ func (c Cookie) replyUnchecked() ([]byte, error) {
case <-c.pingChan:
return nil, nil
}
- panic("unreachable")
}
// Check is used for checked requests that have no replies. It is a mechanism
@@ -164,5 +162,4 @@ func (c Cookie) Check() error {
case <-c.pingChan:
return nil
}
- panic("unreachable")
}