forked from cwtch.im/tapir
Shutting down all connections
This commit is contained in:
parent
334f728073
commit
27afc8d1ce
|
@ -138,4 +138,9 @@ func (s *BaseOnionService) Listen(app tapir.Application) error {
|
||||||
|
|
||||||
func (s *BaseOnionService) Shutdown() {
|
func (s *BaseOnionService) Shutdown() {
|
||||||
s.ls.Close()
|
s.ls.Close()
|
||||||
|
s.connections.Range(func(key, value interface{}) bool {
|
||||||
|
connection := value.(*tapir.Connection)
|
||||||
|
connection.Close()
|
||||||
|
return false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue