[tor-commits] [meek/master] turnaroundDeadline is actually a timeout.
dcf at torproject.org
dcf at torproject.org
Tue Apr 15 23:28:07 UTC 2014
commit e0227e02a732b51c14876b35e78ab66ce72667b3
Author: David Fifield <david at bamsoftware.com>
Date: Tue Apr 15 16:24:40 2014 -0700
turnaroundDeadline is actually a timeout.
That is, a time.Duration, not a time.Time.
---
meek-server/meek-server.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meek-server/meek-server.go b/meek-server/meek-server.go
index a9b1120..697c153 100644
--- a/meek-server/meek-server.go
+++ b/meek-server/meek-server.go
@@ -22,7 +22,7 @@ import "git.torproject.org/pluggable-transports/goptlib.git"
const ptMethodName = "meek"
const minSessionIdLength = 32
const maxPayloadLength = 0x10000
-const turnaroundDeadline = 10 * time.Millisecond
+const turnaroundTimeout = 10 * time.Millisecond
// Passed as ReadTimeout and WriteTimeout when constructing the http.Server.
const readWriteTimeout = 10 * time.Second
const maxSessionStaleness = 120 * time.Second
@@ -119,7 +119,7 @@ func transact(session *Session, w http.ResponseWriter, req *http.Request) error
}
buf := make([]byte, maxPayloadLength)
- session.Or.SetReadDeadline(time.Now().Add(turnaroundDeadline))
+ session.Or.SetReadDeadline(time.Now().Add(turnaroundTimeout))
n, err := session.Or.Read(buf)
if err != nil {
if e, ok := err.(net.Error); !ok || !e.Timeout() {
More information about the tor-commits
mailing list