You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context:
- okhttp uses an HTTP/2 connection to the coder rest api in order to
resolves the workspaces.
- HTTP/2 uses a single TCP connection for multiple requests
(multiplexing). If the connection is idle, the http server can close
that connection, with client side ending in a socket timeout if it
doesn't detect the drop in time.
- similarly on the client side, if the OS goes into sleep mode, the
connection might have been interrupted. HTTP/2 doesn't always detect
this quickly, leading to stale streams when Toolbox wakes up.
Implementation:
- we could try to force the client to use HTTP/1 which creates a TCP
connection for each request, but from my testing it seems that
configuring a retry strategy when a client attempts to reuse a TCP
connection that has unexpectedly closed plus detecting large gaps
between the last poll time and socket timeout time allows us to reset
the client and create fresh TCP connections.
- resolves#13
0 commit comments