fix: retries,acktimeout configuration socketio

This commit is contained in:
abdou6666
2025-05-01 16:48:03 +01:00
parent beddb7f22a
commit 7b5e0a1aa6
6 changed files with 65 additions and 25 deletions

View File

@@ -29,19 +29,19 @@ export class SocketIoClient {
*/
static defaultConfig: SocketIoClientConfig = {
// Socket options
ackTimeout: 1000,
// auth: undefined,
retries: 3,
// Manager options
autoConnect: true,
// parser: undefined,
// randomizationFactor:0.5,
randomizationFactor: 0.5,
reconnection: true,
reconnectionAttempts: 100,
reconnectionDelay: 1000,
reconnectionDelayMax: 5000,
timeout: 20000,
retries: 0,
ackTimeout: 15_000,
// Low Level Options
addTrailingSlash: true, // eg: https://domain.path/ => https://domain.path/
@@ -154,6 +154,7 @@ export class SocketIoClient {
if (response.statusCode >= 200 && response.statusCode < 300) {
return response;
}
throw new Error(
`Request failed with status code ${response.statusCode}: ${JSON.stringify(
response.body,