summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/http/service.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/service/http/service.go b/service/http/service.go
index ecf7a394..aa3d0011 100644
--- a/service/http/service.go
+++ b/service/http/service.go
@@ -113,7 +113,10 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
func (s *Service) listener(event int, ctx interface{}) {
- // todo: DIE on server failure
+ if event == roadrunner.EventServerFailure {
+ s.Stop()
+ }
+
for _, l := range s.listeners {
l(event, ctx)
}