For the problem described at https://github.com/canonical/operator/issues/1246, this issue represents the Pebble side: we should fix the /v1/tasks/{task_id}/websocket/{websocket_id} endpoint so that if the Pebble side has already timed out ("timeout waiting for websocket connections"), we should time out (or cancel immediately) attempts to connect to that websocket URL.
For the problem described at https://github.com/canonical/operator/issues/1246, this issue represents the Pebble side: we should fix the
/v1/tasks/{task_id}/websocket/{websocket_id}
endpoint so that if the Pebble side has already timed out ("timeout waiting for websocket connections"), we should time out (or cancel immediately) attempts to connect to that websocket URL.Marking as Low Priority given the Ops-side fix at https://github.com/canonical/operator/pull/1247.