From 27afc8d1ce26112500bb4b1ef22af9bec5538ac2 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 17 Jul 2019 12:00:27 -0700 Subject: [PATCH] Shutting down all connections --- networks/tor/BaseOnionService.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/networks/tor/BaseOnionService.go b/networks/tor/BaseOnionService.go index c408571..7882713 100644 --- a/networks/tor/BaseOnionService.go +++ b/networks/tor/BaseOnionService.go @@ -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 + }) }