summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-06 19:40:01 +0300
committerWolfy-J <[email protected]>2018-06-06 19:40:01 +0300
commitc21f34e7f123c126722352f4460654c4aaf39b8b (patch)
treee4a9f19ea8d47153c3c3c89be8e0fc2f12ba2476 /server.go
parent7dcc900c37fa1b3cbcf41e211d7280171329587d (diff)
dead functions
Diffstat (limited to 'server.go')
-rw-r--r--server.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/server.go b/server.go
index 16c9d39f..7bf041e8 100644
--- a/server.go
+++ b/server.go
@@ -176,6 +176,13 @@ func (srv *Server) poolObserver(event int, ctx interface{}) {
if event == EventPoolError {
// pool failure, rebuilding
if err := srv.Reset(); err != nil {
+ srv.mu.Lock()
+ defer srv.mu.Unlock()
+
+ srv.started = false
+ srv.pool = nil
+ srv.factory = nil
+
// everything is dead
srv.throw(EventServerFailure, srv)
}