Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Feb 12, 2024
1 parent 0580bec commit 878ee37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const config = {
// port that server listens on
port: parseInt(process.env.DS_PORT || '3000'),
// whether to enable 'ws:'
webSocketServerEnabled: { on: true, off: false }[process.env.DS_WEBSOCKET_SERVER] ?? true,
webSocketServerEnabled: { on: true, off: false }[process.env.DWN_WEBSOCKET_SERVER] ?? true,
// where to store persistent data
messageStore: process.env.DWN_STORAGE_MESSAGES || process.env.DWN_STORAGE || 'level://data',
dataStore: process.env.DWN_STORAGE_DATA || process.env.DWN_STORAGE || 'level://data',
Expand Down
2 changes: 1 addition & 1 deletion src/ws-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class WsApi {
*/
#setupWebSocket(): void {
this.#wsServer.on('connection', this.#connections.connect.bind(this));
this.#wsServer.on('close', this.#connections.close);
this.#wsServer.on('close', this.#connections.close.bind(this));
}

start(callback?: () => void): WebSocketServer {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export async function sendWsMessage(
});
}

const MAX_RESPONSE_TIMEOUT = 3_000;
const MAX_RESPONSE_TIMEOUT = 1_500;

export async function subscriptionRequest(
url: string,
Expand Down

0 comments on commit 878ee37

Please sign in to comment.