mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: avoid agent runLoop exiting due to ws ping (#8852)
This commit is contained in:
+3
-1
@@ -236,7 +236,9 @@ func (a *agent) runLoop(ctx context.Context) {
|
||||
if err == nil {
|
||||
continue
|
||||
}
|
||||
if errors.Is(err, context.Canceled) {
|
||||
if ctx.Err() != nil {
|
||||
// Context canceled errors may come from websocket pings, so we
|
||||
// don't want to use `errors.Is(err, context.Canceled)` here.
|
||||
return
|
||||
}
|
||||
if a.isClosed() {
|
||||
|
||||
Reference in New Issue
Block a user