summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-06 19:43:46 +0300
committerWolfy-J <[email protected]>2018-06-06 19:43:46 +0300
commita48a65a93ece4990e661234a443c9abd8e67b649 (patch)
tree9994d3f3c23c7870948e534be95da05e2e103132 /server.go
parent0da16e4ad9af6dff00c8431da7dc29cbd1d97f9e (diff)
more error handling
Diffstat (limited to 'server.go')
-rw-r--r--server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.go b/server.go
index 9a897fd0..b326eb32 100644
--- a/server.go
+++ b/server.go
@@ -16,6 +16,9 @@ const (
// EventServerFailure triggered when server is unable to replace dead pool.
EventServerFailure
+ // EventReplaceFailure triggered when server can not replace pool while the re-configuration.
+ EventReplaceFailure
+
// EventNewPool triggered when server creates new pool.
EventNewPool
@@ -74,6 +77,7 @@ func (srv *Server) Reconfigure(cfg *ServerConfig) error {
pool, err := NewPool(srv.cmd, srv.factory, cfg.Pool)
if err != nil {
+ srv.throw(EventReplaceFailure, err)
return err
}
srv.throw(EventNewPool, pool)