Shutting down all connections

This commit is contained in:
Sarah Jamie Lewis 2019-07-17 12:00:27 -07:00
parent 334f728073
commit 27afc8d1ce
1 changed files with 5 additions and 0 deletions

View File

@ -138,4 +138,9 @@ func (s *BaseOnionService) Listen(app tapir.Application) error {
func (s *BaseOnionService) Shutdown() {
s.ls.Close()
s.connections.Range(func(key, value interface{}) bool {
connection := value.(*tapir.Connection)
connection.Close()
return false
})
}