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

このコミットが含まれているのは:
Sarah Jamie Lewis 2020-10-29 15:45:07 -07:00
コミット ddc52c332f
1個のファイルの変更3行の追加1行の削除

ファイルの表示

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