Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase proxy stall timeout #263

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/station/lib/proxies.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import (
"github.com/refraction-networking/conjure/pkg/station/log"
)

const proxyStallTimeout = 30 * time.Second
const proxyStallTimeout = 2 * time.Minute
const proxyInitTimeout = 30 * time.Second
const resetIfNotClosedAfter = 10 // seconds

var (
Expand Down Expand Up @@ -119,12 +120,12 @@ func halfPipe(src net.Conn, dst net.Conn,
}()

// Set deadlines in case either side disappears.
err := src.SetDeadline(time.Now().Add(proxyStallTimeout))
err := src.SetDeadline(time.Now().Add(proxyInitTimeout))
if err != nil {
logger.Errorln("error setting deadline for src conn: ", tag)
return
}
err = dst.SetDeadline(time.Now().Add(proxyStallTimeout))
err = dst.SetDeadline(time.Now().Add(proxyInitTimeout))
if err != nil {
logger.Errorln("error setting deadline for dst conn: ", tag)
return
Expand Down
Loading