From 3f72103eb064f02fedc94701092a3435c1aa9bba Mon Sep 17 00:00:00 2001 From: Jared Klopper Date: Sat, 10 Oct 2015 23:14:02 +1300 Subject: [PATCH] Change reconnectionAttempts from boolean to number #6209 --- socket.io-client/socket.io-client-tests.ts | 4 ++++ socket.io-client/socket.io-client.d.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/socket.io-client/socket.io-client-tests.ts b/socket.io-client/socket.io-client-tests.ts index 215932c46..cd9be6d3d 100644 --- a/socket.io-client/socket.io-client-tests.ts +++ b/socket.io-client/socket.io-client-tests.ts @@ -55,3 +55,7 @@ function testUsingItJustAsACrossBrowserWebSocket() { }); }); } + +function testSettingReconnectionAttempts() { + var manager = io.Manager({ reconnection: true, timeout: 0, reconnectionAttempts: 2, reconnectionDelay: 10 }); +} diff --git a/socket.io-client/socket.io-client.d.ts b/socket.io-client/socket.io-client.d.ts index 9f93c1f16..32f51aea4 100644 --- a/socket.io-client/socket.io-client.d.ts +++ b/socket.io-client/socket.io-client.d.ts @@ -458,7 +458,7 @@ declare module SocketIOClient { * How many reconnection attempts should we try? * @default Infinity */ - reconnectionAttempts?: boolean; + reconnectionAttempts?: number; /** * The time delay in milliseconds between reconnection attempts