From c1bf4de70f8a11a35f86ed109101d332c06a7d49 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 8 Apr 2014 19:40:10 +1000 Subject: [PATCH] Mask EHOSTUNREACH on connect() --- client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index fac59b75..9b9a6d38 100644 --- a/client.go +++ b/client.go @@ -46,6 +46,7 @@ func (cl *Client) PrioritizeDataRegion(ih InfoHash, off, len_ int64) { } off += int64(req.Length) len_ -= int64(req.Length) + // TODO(anacrolix): Determine if this check is satisfactory. if _, ok = t.Pieces[req.Index].PendingChunkSpecs[req.ChunkSpec]; !ok { continue } @@ -232,7 +233,7 @@ func (me *Client) initiateConn(peer Peer, torrent *Torrent) { return } switch netOpErr.Err { - case syscall.ECONNREFUSED: + case syscall.ECONNREFUSED, syscall.EHOSTUNREACH: return } } -- 2.48.1