From 6efff480257dac977743a53fbc133d1ed6118064 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 3 Feb 2022 22:01:14 +0900 Subject: [PATCH] refactor --- packages/backend/src/server/api/streaming.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/streaming.ts b/packages/backend/src/server/api/streaming.ts index ad87311064..b706b1b8df 100644 --- a/packages/backend/src/server/api/streaming.ts +++ b/packages/backend/src/server/api/streaming.ts @@ -59,7 +59,7 @@ module.exports = (server: http.Server) => { }); connection.on('message', async (data) => { - if (data.utf8Data === 'ping') { + if (data.type === 'utf8' && data.utf8Data === 'ping') { connection.send('pong'); } });