feat: bump workspace deadline on user activity (#4119)

Resolves #2995
This commit is contained in:
Ammar Bandukwala
2022-09-20 16:17:24 -05:00
committed by GitHub
parent 0899548208
commit d30945c5c5
6 changed files with 189 additions and 6 deletions

View File

@ -281,12 +281,10 @@ func (c *Client) DialWorkspaceAgentTailnet(ctx context.Context, logger slog.Logg
CompressionMode: websocket.CompressionDisabled,
})
if errors.Is(err, context.Canceled) {
_ = ws.Close(websocket.StatusAbnormalClosure, "")
return
}
if err != nil {
logger.Debug(ctx, "failed to dial", slog.Error(err))
_ = ws.Close(websocket.StatusAbnormalClosure, "")
continue
}
sendNode, errChan := tailnet.ServeCoordinator(websocket.NetConn(ctx, ws, websocket.MessageBinary), func(node []*tailnet.Node) error {