Skip to content

Commit

Permalink
Comment and update the PubSubRouter stop method
Browse files Browse the repository at this point in the history
  • Loading branch information
bogh committed May 18, 2016
1 parent d182e0d commit e8be533
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func (router *PubSubRouter) SetAccessManager(accessManager AccessManager) {
}

func (router *PubSubRouter) Go() *PubSubRouter {

if router.accessManager == nil {
panic("AccessManager not set. Cannot start.")
}
Expand All @@ -77,11 +76,13 @@ func (router *PubSubRouter) Go() *PubSubRouter {
}()
}
}()

return router
}

// Stop stops the router by closing the stop channel
func (router *PubSubRouter) Stop() error {
router.stop <- true
close(router.stop)
return nil
}

Expand Down

0 comments on commit e8be533

Please sign in to comment.