Skip to content

Commit f20c67c

Browse files
committed
Update WebSocket event handling in Home component to unify disconnect event naming
1 parent d340542 commit f20c67c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/home.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ export default function Home({ }) {
18041804
ws.onclose = () => {
18051805
setWs(null)
18061806
console.log("ws closed")
1807-
sendEvent("multiplayer_wsclose")
1807+
sendEvent("multiplayer_disconnect")
18081808
setMultiplayerState((prev) => ({
18091809
...initialMultiplayerState,
18101810
maxRetries: prev.maxRetries,
@@ -1828,7 +1828,7 @@ export default function Home({ }) {
18281828
ws.onerror = () => {
18291829
setWs(null)
18301830
console.log("ws error")
1831-
sendEvent("multiplayer_wserror")
1831+
sendEvent("multiplayer_disconnect")
18321832

18331833
setMultiplayerState((prev) => ({
18341834
...initialMultiplayerState,

0 commit comments

Comments
 (0)