Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
Start using milliseconds for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyfrolov committed Apr 25, 2017
1 parent 4c7e202 commit 058dc73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tapdance/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"
)

const timeoutMax = 30
const timeoutMin = 20
const timeoutMax = 30000
const timeoutMin = 20000

const sendLimitMax = 15614
const sendLimitMin = 14400
Expand Down
2 changes: 1 addition & 1 deletion tapdance/tdConn.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func (tdConn *tapdanceConn) connect() {
// TapDance should NOT have a timeout, timeouts have to be handled by client and server
tdConn.SetDeadline(time.Time{}) // unsets timeout
tdConn.writerTimeout = time.After(time.Duration(getRandInt(timeoutMin, timeoutMax)) *
time.Second)
time.Millisecond)
// reader shouldn't timeout yet
tdConn.readerTimeout = time.After(1 * time.Hour)

Expand Down

0 comments on commit 058dc73

Please sign in to comment.