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

Reviewed-on: #26
This commit is contained in:
Dan Ballard 2020-10-29 15:51:34 -07:00
커밋 b97196a4ce
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()