Skip to content

Commit 727887b

Browse files
committed
Add comment back
1 parent 38832b1 commit 727887b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/api/internal/orchestrator/keep_alive.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ func (o *Orchestrator) KeepAliveFor(ctx context.Context, sandboxID string, durat
4848
case errors.Is(err, errMaxInstanceLengthExceeded):
4949
return &api.APIError{Code: http.StatusBadRequest, ClientMsg: "Max instance length exceeded", Err: err}
5050
case errors.Is(err, errCannotSetTTL):
51-
return &api.APIError{Code: http.StatusBadRequest, ClientMsg: "Cannot set ttl", Err: err}
51+
// If shorter than the current end time, we don't extend, so we can return
52+
return nil
5253
default:
5354
return &api.APIError{Code: http.StatusInternalServerError, ClientMsg: "Error when setting sandbox timeout", Err: err}
5455
}

0 commit comments

Comments
 (0)