safe shutdown
This commit is contained in:
parent
6fda5d223a
commit
d368ee1609
|
@ -444,7 +444,9 @@ func (cp *cwtchPeer) Listen() error {
|
|||
// Shutdown kills all connections and cleans up all goroutines for the peer
|
||||
func (cp *cwtchPeer) Shutdown() {
|
||||
cp.connectionsManager.Shutdown()
|
||||
cp.app.Shutdown()
|
||||
if cp.app != nil {
|
||||
cp.app.Shutdown()
|
||||
}
|
||||
cp.Save()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue