summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-11 22:00:18 +0300
committerWolfy-J <[email protected]>2018-06-11 22:00:18 +0300
commitbc81f923cba74e2acad183c6828b40f02c25d16c (patch)
treeb4bc47b9bf14a724ff83cdf42523ecc48fda5053
parent1b89f26e3674bcb062b78a87bcf9fb60af04b046 (diff)
no library dependency
-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)
}