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

@@ -514,7 +514,7 @@ var ErrNotDone = errors.New("did not receive a Core::Done event targeting previo
const (
// syncTimeout is the maximum duration [Core.Sync] is allowed to take before
// receiving [CoreDone] or failing.
syncTimeout = 10 * time.Second
syncTimeout = RoundtripTimeout + 15*time.Second
)
// Sync queues a [CoreSync] message for the PipeWire server and initiates a Roundtrip.

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 {

View File

@@ -717,7 +717,7 @@ type stubUnixConn struct {
}
func (conn *stubUnixConn) MightBlock(timeout time.Duration) {
if timeout != 5*time.Second {
if timeout != pipewire.RoundtripTimeout {
panic("unexpected timeout " + timeout.String())
}
if conn.current == 0 ||