@holochain/client
Advanced tools
Comparing version 0.12.4 to 0.12.5
@@ -67,7 +67,7 @@ import { decode, encode } from "@msgpack/msgpack"; | ||
}; | ||
socket.on("close", (event) => { | ||
socket.onclose = (event) => { | ||
const pendingRequestIds = Object.keys(this.pendingRequests).map((id) => parseInt(id)); | ||
if (pendingRequestIds.length) { | ||
pendingRequestIds.forEach((id) => { | ||
const error = new Error(`Websocket closed with pending requests. Close event: ${event}, request id: ${id}`); | ||
const error = new Error(`Websocket closed with pending requests. Close event code: ${event.code}, request id: ${id}`); | ||
this.pendingRequests[id].reject(error); | ||
@@ -77,3 +77,3 @@ delete this.pendingRequests[id]; | ||
} | ||
}); | ||
}; | ||
} | ||
@@ -80,0 +80,0 @@ /** |
{ | ||
"name": "@holochain/client", | ||
"version": "0.12.4", | ||
"version": "0.12.5", | ||
"description": "A JavaScript client for the Holochain Conductor API", | ||
@@ -5,0 +5,0 @@ "author": "Holochain Foundation <info@holochain.org> (http://holochain.org)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97053