-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
RefactoringThis PR is a strict refactoring.This PR is a strict refactoring.
Description
3a1d301 has me convinced that we set separately both a process-level (ProxyCommand) timeout and a request-level (ProxyRequest) timeout, with some impedance mismatch that we then have to reconcile:
ProxyCommand.timeoutis in seconds because that's whatsecuredrop-proxyexpects:
securedrop-client/proxy/src/main.rs
Line 42 in 3a1d301
timeout: u64, // sec
securedrop-client/proxy/src/main.rs
Line 156 in 3a1d301
.timeout(Duration::from_secs(incoming_request.timeout)); ProxyRequest.timeoutis in milliseconds because that's the standard unit in JavaScript for setting timers (intervals).- We need
ProxyCommand.timeout >= ProxyRequest.timeout, or else we see cases like app: initial sync of a large index can time out #3048 where a very live proxy command has been terminated rather than timing out. - We construct a
ProxyCommandfor eachProxyRequestanyway.
3a1d301 introduces some nominal typing to address (1) and (2), and I think it helps enforce (3). But (4) makes me think that we can simplify these paths so that the caller sets a single request-level timeout of
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RefactoringThis PR is a strict refactoring.This PR is a strict refactoring.
Type
Projects
Status
Backlog