Skip to content

Commit 121e2bb

Browse files
committed
Fix keep-alive message ping
1 parent b9ba8e9 commit 121e2bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gptscript-operator",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"main": "index.js",
55
"license": "MIT",
66
"type": "module",

src/modules/ChatHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class ChatHandler {
5151
console.log('Received ping from client');
5252
// Optionally, send a pong response
5353
ws.send(JSON.stringify({ type: 'pong' }));
54+
} else {
55+
await this.handleMessage(ws, parsedMessage);
5456
}
55-
56-
await this.handleMessage(ws, parsedMessage);
5757
});
5858

5959
ws.on('close', () => {

0 commit comments

Comments
 (0)