[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [websocket/master] Use new convention for Temporary errors from AcceptSocks.



commit 84b1f7529a6dde712d8aab297f247e4baee32d70
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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=50b39b746c6ff34bf31977b658848d876ee84fbf
---
 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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits