[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Multiply by time.Second in the global constant.
commit 4481a6f1f17271b5d605cdeade670df250073714
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Thu May 30 14:38:19 2013 -0700
Multiply by time.Second in the global constant.
---
websocket-transport/websocket-client.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/websocket-transport/websocket-client.go b/websocket-transport/websocket-client.go
index 334c78c..767205a 100644
--- a/websocket-transport/websocket-client.go
+++ b/websocket-transport/websocket-client.go
@@ -19,7 +19,7 @@ import (
)
const ptMethodName = "websocket"
-const socksTimeout = 2
+const socksTimeout = 2 * time.Second
const bufSiz = 1500
// When a connection handler starts, +1 is written to this channel; when it
@@ -113,7 +113,7 @@ func handleConnection(conn *net.TCPConn) error {
var ws *websocket.Conn
- conn.SetDeadline(time.Now().Add(socksTimeout * time.Second))
+ conn.SetDeadline(time.Now().Add(socksTimeout))
err := AwaitSocks4aConnect(conn, func(dest string) (*net.TCPAddr, error) {
// Disable deadline.
conn.SetDeadline(time.Time{})
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits