Merge branch 'safe-shutdown' of dan/cwtch into master

This commit is contained in:
Sarah Jamie Lewis 2018-10-24 04:03:26 +00:00 committed by Gogs
commit 22c8941282
1 changed files with 3 additions and 1 deletions

View File

@ -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()
}