-
Notifications
You must be signed in to change notification settings - Fork 10
Add a timeout to check connection #177
Copy link
Copy link
Open
Labels
2 - BEGINNERAn issue where no prerequisite knowledge is requiredAn issue where no prerequisite knowledge is requiredapiRelating to the API onlyRelating to the API onlycliRelating to the CLI onlyRelating to the CLI onlymid prioMid priority, doesn't need to be done immediately but should be picked up soon.Mid priority, doesn't need to be done immediately but should be picked up soon.
Metadata
Metadata
Assignees
Labels
2 - BEGINNERAn issue where no prerequisite knowledge is requiredAn issue where no prerequisite knowledge is requiredapiRelating to the API onlyRelating to the API onlycliRelating to the CLI onlyRelating to the CLI onlymid prioMid priority, doesn't need to be done immediately but should be picked up soon.Mid priority, doesn't need to be done immediately but should be picked up soon.
Per Copilot:
CheckConnection uses http.Get with the default client (no timeout). Since this is called during CLI startup now, a stalled network connection can hang the CLI indefinitely. Consider using an http.Client with a short timeout (and possibly HEAD instead of GET) to keep the CLI responsive.