summaryrefslogtreecommitdiff
path: root/router.go
diff options
context:
space:
mode:
Diffstat (limited to 'router.go')
-rw-r--r--router.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/router.go b/router.go
index 0bd402f4..dffa0e88 100644
--- a/router.go
+++ b/router.go
@@ -135,15 +135,13 @@ func (r *Router) throw(event int, ctx interface{}) {
}
}
-// Observe pools
+// Observe pool events
func (r *Router) poolObserver(event int, ctx interface{}) {
- if event == EventError {
- if _, ok := ctx.(PoolError); ok {
- // pool failure, rebuilding
- r.Reset()
- }
- }
-
// bypassing to user specified observer
r.throw(event, ctx)
+
+ if event == EventPoolError {
+ // pool failure, rebuilding
+ r.Reset()
+ }
}