forked from cwtch.im/cwtch
Listen Error
This commit is contained in:
parent
101cce532f
commit
815ec2565b
|
@ -145,15 +145,17 @@ func (e *engine) createPeerTemplate() *PeerApp {
|
|||
// Listen sets up an onion listener to process incoming cwtch messages
|
||||
func (e *engine) listenFn() {
|
||||
err := e.service.Listen(e.createPeerTemplate())
|
||||
if !e.shuttingDown {
|
||||
e.eventManager.Publish(event.NewEvent(event.ProtocolEngineStopped, map[event.Field]string{event.Identity: e.identity.Hostname(), event.Error: err.Error()}))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Shutdown tears down the eventHandler goroutine
|
||||
func (e *engine) Shutdown() {
|
||||
e.shuttingDown = true
|
||||
e.service.Shutdown()
|
||||
e.connectionsManager.Shutdown()
|
||||
e.service.Shutdown()
|
||||
e.queue.Shutdown()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue