[tor-commits] [flashproxy/master] Multiply by time.Second in the global constant.
dcf at torproject.org
dcf at torproject.org
Thu May 30 23:40:11 UTC 2013
commit 4481a6f1f17271b5d605cdeade670df250073714
Author: David Fifield <david at bamsoftware.com>
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{})
More information about the tor-commits
mailing list