wtt-connect 0.2.24 → 0.2.25
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/package.json +1 -1
- package/src/wtt-client.js +9 -1
package/package.json
CHANGED
package/src/wtt-client.js
CHANGED
|
@@ -156,7 +156,15 @@ export class WTTClient {
|
|
|
156
156
|
reject: (e) => { clearTimeout(timer); reject(e); },
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
|
-
|
|
159
|
+
try {
|
|
160
|
+
await this.sendJson({ action, request_id: requestId, ...payload });
|
|
161
|
+
} catch (err) {
|
|
162
|
+
const pending = this.pending.get(requestId);
|
|
163
|
+
if (pending) {
|
|
164
|
+
this.pending.delete(requestId);
|
|
165
|
+
pending.reject(err);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
160
168
|
return promise;
|
|
161
169
|
}
|
|
162
170
|
|