@holochain/client 0.12.4 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/client.js +3 -3
- package/package.json +1 -1
package/lib/api/client.js
CHANGED
|
@@ -64,16 +64,16 @@ export class WsClient extends Emittery {
|
|
|
64
64
|
console.error(`Got unrecognized Websocket message type: ${message.type}`);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
socket.
|
|
67
|
+
socket.onclose = (event) => {
|
|
68
68
|
const pendingRequestIds = Object.keys(this.pendingRequests).map((id) => parseInt(id));
|
|
69
69
|
if (pendingRequestIds.length) {
|
|
70
70
|
pendingRequestIds.forEach((id) => {
|
|
71
|
-
const error = new Error(`Websocket closed with pending requests. Close event: ${event}, request id: ${id}`);
|
|
71
|
+
const error = new Error(`Websocket closed with pending requests. Close event code: ${event.code}, request id: ${id}`);
|
|
72
72
|
this.pendingRequests[id].reject(error);
|
|
73
73
|
delete this.pendingRequests[id];
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
}
|
|
76
|
+
};
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Instance factory for creating WsClients.
|
package/package.json
CHANGED