Check if Listener exists before trying to close it
the build was successful Ayrıntılar

Bu işleme şunda yer alıyor:
Sarah Jamie Lewis 2020-10-29 15:45:07 -07:00
ebeveyn 8af406a421
işleme ddc52c332f
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme

Dosyayı Görüntüle

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