Added context cancellation tests.

This commit is contained in:
Jay
2026-04-18 18:01:22 -04:00
parent 10c29c8330
commit 2b6afbbf94
4 changed files with 203 additions and 5 deletions
+6
View File
@@ -47,6 +47,12 @@ func AcquireSocket(
url string,
logger *slog.Logger,
) (types.Socket, *http.Response, error) {
select {
case <-ctx.Done():
return nil, nil, ctx.Err()
default:
}
if retryMgr == nil {
return nil, nil, NewConnectionError("retry manager cannot be nil")
}