Skip to content

Commit 6f9a9ea

Browse files
2 parents 69b0382 + 103eb09 commit 6f9a9ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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": "@codebolt/codeboltjs",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/core/websocket.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class cbws {
5858
const parentIdParam = process.env.parentId ? `&parentId=${process.env.parentId}` : '';
5959
const parentAgentInstanceIdParam = process.env.parentAgentInstanceId ? `&parentAgentInstanceId=${process.env.parentAgentInstanceId}` : '';
6060
const agentTask = process.env.agentTask ? `&agentTask=${process.env.agentTask}` : '';
61-
this.websocket = new WebSocket(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${agentTask}${process.env.Is_Dev ? '&dev=true' : ''}`);
61+
const socketPort = process.env.SOCKET_PORT || '12345';
62+
this.websocket = new WebSocket(`ws://localhost:${socketPort}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${agentTask}${process.env.Is_Dev ? '&dev=true' : ''}`);
6263

6364
return new Promise((resolve, reject) => {
6465
this.websocket.on('error', (error: Error) => {

0 commit comments

Comments
 (0)