Browse Source

lib/discovery: Receiving a new announcement should be non-blocking

Pretty sure the intention of the select was for it to be non-blocking.
Not that it will matter almost ever.
Jakob Borg 9 years ago
parent
commit
a551686d37
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/discover/local.go

+ 3 - 0
lib/discover/local.go

@@ -179,8 +179,11 @@ func (c *localClient) recvAnnouncements(b beacon.Interface) {
 		}
 
 		if newDevice {
+			// Force a transmit to announce ourselves, if we are ready to do
+			// so right away.
 			select {
 			case c.forcedBcastTick <- time.Now():
+			default:
 			}
 		}
 	}