Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/server/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ export class ClientSession implements Session {
this.useCompression
)
} else {
void handleSend(ctx, socket, { result: tx }, 1024 * 1024, this.binaryMode, this.useCompression)
void handleSend(ctx, socket, { result: tx }, 1024 * 1024, this.binaryMode, this.useCompression).catch((err) => {
ctx.error('failed to broadcast', err)
})
}
}

Expand Down
12 changes: 9 additions & 3 deletions server/server/src/sessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ class TSessionManager implements SessionManager {
this.ctx.warn('session hang, closing...', { wsId, user: s[1].session.getUser() })

// Force close workspace if only one client and it hang.
void this.close(this.ctx, s[1].socket, wsId)
void this.close(this.ctx, s[1].socket, wsId).catch((err) => {
this.ctx.error('failed to close', err)
})
continue
}
if (
Expand Down Expand Up @@ -579,7 +581,9 @@ class TSessionManager implements SessionManager {
function send (): void {
for (const session of sessions) {
try {
void sendResponse(ctx, session.session, session.socket, { result: tx })
void sendResponse(ctx, session.session, session.socket, { result: tx }).catch((err) => {
ctx.error('failed to send', err)
})
} catch (err: any) {
Analytics.handleError(err)
ctx.error('error during send', { error: err })
Expand Down Expand Up @@ -1181,7 +1185,9 @@ export function startSessionManager (
shutdown: opt.serverFactory(
sessions,
(rctx, service, ws, msg, workspace) => {
void sessions.handleRequest(rctx, service, ws, msg, workspace)
void sessions.handleRequest(rctx, service, ws, msg, workspace).catch((err) => {
ctx.error('failed to handle request', err)
})
},
ctx,
opt.pipelineFactory,
Expand Down
Loading