diff options
-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) } |