diff options
author | Wolfy-J <[email protected]> | 2018-06-06 19:40:01 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-06 19:40:01 +0300 |
commit | c21f34e7f123c126722352f4460654c4aaf39b8b (patch) | |
tree | e4a9f19ea8d47153c3c3c89be8e0fc2f12ba2476 /server.go | |
parent | 7dcc900c37fa1b3cbcf41e211d7280171329587d (diff) |
dead functions
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) } |