Skip to content

Commit aa4144e

Browse files
authored
More socket-io client fixes from PR feedback (#7619)
1 parent c1509da commit aa4144e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cloud/src/bridge/SocketTransport.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ export class SocketTransport {
222222

223223
// This is a custom event fired by the server.
224224
this.socket.on("auth_error", (error) => {
225-
console.error(`[SocketTransport] on (auth_error):`, error)
225+
console.error(
226+
`[SocketTransport] on(auth_error): ${error instanceof Error ? error.message : String(error)}`,
227+
)
226228

227229
if (connectionTimeout && this.connectionState !== ConnectionState.CONNECTED) {
228230
clearTimeout(connectionTimeout)
@@ -243,6 +245,7 @@ export class SocketTransport {
243245

244246
if (this.socket) {
245247
this.socket.removeAllListeners()
248+
this.socket.io.removeAllListeners()
246249
this.socket.disconnect()
247250
this.socket = null
248251
}

0 commit comments

Comments
 (0)