summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-12 21:13:54 +0300
committerWolfy-J <[email protected]>2018-06-12 21:13:54 +0300
commit47aa87a1cd438c6c99a4640f6af60fd408b5c3bc (patch)
treeb405ad7e1d3e6810c818be47a9cf67b7a534053c /server.go
parent99c1121d8fd31b7b61b6c22e181dc3c05a3f9f82 (diff)
improved worker watching
Diffstat (limited to 'server.go')
-rw-r--r--server.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/server.go b/server.go
index 75cf3691..efdeaca2 100644
--- a/server.go
+++ b/server.go
@@ -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.