Skip to content

Commit

Permalink
Properly break out of the 'announceConnection' loop when exiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
adewes committed Jul 22, 2021
1 parent 2b9227b commit d145bdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/private_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ func (s *PrivateServer) announceConnectionsRPC(announcements []*PrivateAnnouncem
}

func (s *PrivateServer) announceConnections() {
loop:
for {

groupedAnnouncements := map[string][]*PrivateAnnouncement{}
Expand All @@ -673,11 +674,10 @@ func (s *PrivateServer) announceConnections() {
}

select {
// in case of an error we try to reconnect after 1 second
case <-time.After(10 * time.Minute):
case <-s.stop:
s.stop <- true
break
break loop
}
}
}
Expand Down

0 comments on commit d145bdf

Please sign in to comment.