discovery+peer: add logs to reveal shutdown flow
Also adds a `TODO` for checking the err chan.
This commit is contained in:
5 files changed
+12
No files matched your search
@@ -84,6 +84,9 @@ func (s *reliableSender) Start() error {
|
||||
// Stop halts the reliable sender from sending messages to peers.
|
||||
func (s *reliableSender) Stop() {
|
||||
s.stop.Do(func() {
|
||||
log.Debugf("reliableSender is stopping")
|
||||
defer log.Debugf("reliableSender stopped")
|
||||
|
||||
close(s.quit)
|
||||
s.wg.Wait()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user