[tor-commits] [flashproxy/master] Bail out after failing to open a listener.

dcf at torproject.org dcf at torproject.org
Mon Aug 12 02:32:20 UTC 2013


commit 8a082b83677b8c4dcf55abf1fa358cf9283735e9
Author: David Fifield <david at bamsoftware.com>
Date:   Sun Aug 11 17:46:20 2013 -0700

    Bail out after failing to open a listener.
---
 websocket-transport/src/pt/pt.go                             |    1 +
 websocket-transport/src/websocket-server/websocket-server.go |    1 +
 2 files changed, 2 insertions(+)

diff --git a/websocket-transport/src/pt/pt.go b/websocket-transport/src/pt/pt.go
index 60e4507..f6262d1 100644
--- a/websocket-transport/src/pt/pt.go
+++ b/websocket-transport/src/pt/pt.go
@@ -18,6 +18,7 @@
 // 	ln, err := startListener(bindAddr.Addr)
 // 	if err != nil {
 // 		pt.SmethodError(bindAddr.MethodName, err.Error())
+// 		continue
 // 	}
 // 	pt.Smethod(bindAddr.MethodName, ln.Addr())
 // }
diff --git a/websocket-transport/src/websocket-server/websocket-server.go b/websocket-transport/src/websocket-server/websocket-server.go
index b735bd1..3ea7481 100644
--- a/websocket-transport/src/websocket-server/websocket-server.go
+++ b/websocket-transport/src/websocket-server/websocket-server.go
@@ -237,6 +237,7 @@ func main() {
 		ln, err := startListener(bindAddr.Addr)
 		if err != nil {
 			pt.SmethodError(bindAddr.MethodName, err.Error())
+			continue
 		}
 		pt.Smethod(bindAddr.MethodName, ln.Addr())
 		Log("listening on %s", ln.Addr().String())





More information about the tor-commits mailing list