commit 84b1f7529a6dde712d8aab297f247e4baee32d70 Author: David Fifield david@bamsoftware.com Date: Sat Jun 27 20:18:23 2015 -0700
Use new convention for Temporary errors from AcceptSocks.
https://trac.torproject.org/projects/tor/ticket/14135 https://gitweb.torproject.org/pluggable-transports/goptlib.git/commit/?id=50... --- pt-websocket-client/pt-websocket-client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pt-websocket-client/pt-websocket-client.go b/pt-websocket-client/pt-websocket-client.go index fe38c9d..20d12bd 100644 --- a/pt-websocket-client/pt-websocket-client.go +++ b/pt-websocket-client/pt-websocket-client.go @@ -156,10 +156,10 @@ func socksAcceptLoop(ln *pt.SocksListener) error { for { socks, err := ln.AcceptSocks() if err != nil { - if e, ok := err.(*net.OpError); ok && !e.Temporary() { - return err + if e, ok := err.(*net.OpError); ok && e.Temporary() { + continue } - continue + return err } go func() { err := handleConnection(socks)
tor-commits@lists.torproject.org