Safely debounce signaling calls
Summary
We are currently experiencing race conditions in the web-app. I believe these might be caused by debounced functions that are used in chat. The
setLastTimeStamp()
setLastTimeStamp() -\> debounced by 1s
hangUp() -\> signaling becomes unvailable
debouncedSetLastSeenTimestamp() -\> signaling no longer available
Steps to reproduce the bug
Not sure if it is reproducable but the stacktrace from this incident suggests that the debouncedSetLastSeenTimestamp function caused the signaling call with missing context
Uncaught Error: can not send message to conferenceContext
sendMessage common.ts:17
c chat.ts:93
apiMiddleware index.ts:1535
createThunkMiddleware Redux
dispatch <anonymous code>:6
debouncedSetLastSeenTimestamp Chat.tsx:58
Lodash 3
sentryWrapped helpers.js:93
common.ts:17:11
sendMessage common.ts:17
c chat.ts:93
apiMiddleware index.ts:1535
createThunkMiddleware Redux
dispatch <anonymous code>:6
debouncedSetLastSeenTimestamp Chat.tsx:58
Lodash 3
sentryWrapped helpers.js:93
Acceptance Criteria
- Check if the conference room context is available before calling the debounced function again
