1
0
forked from rosa/hakurei

all: raise timeout defaults

This avoids timing out on systems running very slowly.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 17:02:36 +09:00
parent bac583f89e
commit 420c721c7d
11 changed files with 17 additions and 15 deletions

View File

@@ -701,14 +701,14 @@ func (ctx *Context) Roundtrip() (err error) {
}
const (
// roundtripTimeout is the maximum duration socket operations during
// RoundtripTimeout is the maximum duration socket operations during
// Context.roundtrip is allowed to block for.
roundtripTimeout = 5 * time.Second
RoundtripTimeout = 30 * time.Second
)
// roundtrip implements the Roundtrip method without checking proxyErrors.
func (ctx *Context) roundtrip() (err error) {
ctx.conn.MightBlock(roundtripTimeout)
ctx.conn.MightBlock(RoundtripTimeout)
if err = ctx.sendmsg(ctx.buf, ctx.pendingFiles...); err != nil {
return
}
@@ -742,7 +742,7 @@ func (ctx *Context) roundtrip() (err error) {
}()
var remaining []byte
ctx.conn.MightBlock(roundtripTimeout)
ctx.conn.MightBlock(RoundtripTimeout)
for {
remaining, err = ctx.consume(remaining)
if err == nil {