Skip to content

Commit

Permalink
added eventName for connection
Browse files Browse the repository at this point in the history
  • Loading branch information
hardikroongta8 committed Mar 31, 2024
1 parent e2bfa1e commit d93668c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion handlers/websocketHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ exports.connectionHandler = async(socket, req) => {
socket.close();
}else{
socket.connectionId = uuid.v4();
socket.send(JSON.stringify({connectionId: socket.connectionId}));
socket.send(JSON.stringify({
eventName: 'CONNECTION',
connectionId: socket.connectionId
}));
setTimeout(() => {
socket.send(JSON.stringify({
eventName: "TIMEOUT",
Expand Down

0 comments on commit d93668c

Please sign in to comment.