Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add exponential backoff with jitter for the In-App Notification Center to re-establish WebSocket connections" #5425

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading