Don't complain about expected timeout

This commit is contained in:
Jakob Borg 2013-12-24 11:15:21 -05:00
parent f5ea00b297
commit 064bfd366f

View File

@ -243,6 +243,10 @@ func (d *Discoverer) externalLookup(node string) (string, bool) {
n, err := conn.Read(buf) n, err := conn.Read(buf)
if err != nil { if err != nil {
if err, ok := err.(net.Error); ok && err.Timeout() {
// Expected if the server doesn't know about requested node ID
return "", false
}
log.Printf("discover/external/read: %v; no external lookup", err) log.Printf("discover/external/read: %v; no external lookup", err)
return "", false return "", false
} }