5
3
Fork 3

Check if Listener exists before trying to close it
the build was successful Details

Dieser Commit ist enthalten in:
Sarah Jamie Lewis 2020-10-29 15:45:07 -07:00
Ursprung 8af406a421
Commit ddc52c332f
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen

Datei anzeigen

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