Skip to content

Commit

Permalink
Revert "Add exponential backoff with jitter for the In-App Notificati…
Browse files Browse the repository at this point in the history
…on Center to re-establish WebSocket connections"
  • Loading branch information
rifont authored Apr 17, 2024
1 parent 3579cf9 commit 1fb6b18
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ type IUseInitializeSocket = (args: { socketUrl: string }) => {
disconnectSocket: () => void;
};

const RECONNECTION_DELAY_MAX = 60000 * 5; // 5 minutes
const RANDOMIZATION_FACTOR = 1;

export const useInitializeSocket: IUseInitializeSocket = ({ socketUrl }) => {
const socketRef = useRef<Socket | null>(null);

Expand All @@ -33,8 +30,7 @@ export const useInitializeSocket: IUseInitializeSocket = ({ socketUrl }) => {

if (token) {
socketRef.current = io(socketUrl, {
reconnectionDelayMax: RECONNECTION_DELAY_MAX,
randomizationFactor: RANDOMIZATION_FACTOR,
reconnectionDelayMax: 10000,
transports: ['websocket'],
auth: {
token: `${token}`,
Expand Down

0 comments on commit 1fb6b18

Please sign in to comment.