diff options
author | Wolfy-J <[email protected]> | 2018-06-12 21:13:54 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-12 21:13:54 +0300 |
commit | 47aa87a1cd438c6c99a4640f6af60fd408b5c3bc (patch) | |
tree | b405ad7e1d3e6810c818be47a9cf67b7a534053c /server.go | |
parent | 99c1121d8fd31b7b61b6c22e181dc3c05a3f9f82 (diff) |
improved worker watching
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -75,12 +75,12 @@ func (srv *Server) Start() (err error) { } // Stop underlying worker pool and close the factory. -func (srv *Server) Stop() error { +func (srv *Server) Stop() { srv.mu.Lock() defer srv.mu.Unlock() if !srv.started { - return nil + return } srv.throw(EventPoolDestruct, srv.pool) @@ -91,8 +91,6 @@ func (srv *Server) Stop() error { srv.pool = nil srv.started = false srv.throw(EventServerStop, srv) - - return nil } // Exec one task with given payload and context, returns result or error. |