Browse Source

Merge pull request 'Check if Listener exists before trying to close it' (#26) from bugfix into master

Reviewed-on: https://git.openprivacy.ca/cwtch.im/tapir/pulls/26
master
Dan Ballard 2 months ago
parent
commit
b97196a4ce
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      networks/tor/BaseOnionService.go

+ 3
- 1
networks/tor/BaseOnionService.go View File

@@ -172,7 +172,9 @@ func (s *BaseOnionService) Listen(app tapir.Application) error {
func (s *BaseOnionService) Shutdown() {
s.lock.Lock()
defer s.lock.Unlock()
s.ls.Close()
if s.ls != nil {
s.ls.Close()
}
s.connections.Range(func(key, value interface{}) bool {
connection := value.(tapir.Connection)
connection.Close()


Loading…
Cancel
Save