Skip to content

Commit

Permalink
Merge pull request #1 from leevlad/fix-shutdown-npe
Browse files Browse the repository at this point in the history
make an extra shutdown check in the listen routine
  • Loading branch information
thomasstevens89 authored Jul 13, 2020
2 parents ee72946 + d79d10e commit c518c8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions electrum/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ type response struct {

func (s *Server) listen() {
for {
if s.IsShutdown() {
break
}
if s.transport == nil {
break
}
Expand Down

0 comments on commit c518c8c

Please sign in to comment.