Overnap
Builds for 1 pipeline failed in 1 minute 13 seconds

클라이언트 핑퐁 추가

......@@ -73,6 +73,10 @@ const Room: React.FC = () => {
}
}, [roomData]);
const handlePing = useCallback(() => {
socket.emit('ping', {}, () => {});
}, []);
useEffect(() => {
socket.on('msg', handleUpdateRoomUser);
......@@ -90,9 +94,11 @@ const Room: React.FC = () => {
setRoomData(location.state.roomData);
socket.on('msg', handleInGame);
socket.on('ping', handlePing);
return () => {
socket.off('msg', handleInGame);
socket.off('ping', handlePing);
const rawMessage: RawMessage = {
type: MessageType.ROOM_LEAVE,
......