fix call with error handler not throwing on call itself
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rpclibrary",
|
"name": "rpclibrary",
|
||||||
"version": "1.8.1",
|
"version": "1.8.2",
|
||||||
"description": "rpclibrary is a websocket on steroids!",
|
"description": "rpclibrary is a websocket on steroids!",
|
||||||
"main": "./js/Index.js",
|
"main": "./js/Index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export class RPCSocket implements I.Socket{
|
|||||||
return await this.socket.call.apply(this.socket, [rpcname, ...args])
|
return await this.socket.call.apply(this.socket, [rpcname, ...args])
|
||||||
}catch(e){
|
}catch(e){
|
||||||
this.emit('error', e)
|
this.emit('error', e)
|
||||||
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -614,10 +614,7 @@ describe("attaching handlers before connecting", ()=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
sock.connect().then(_ => {
|
sock.connect().then(_ => {
|
||||||
sock.call("unknownRPC123", "AAAAA").catch(e => {
|
sock.call("unknownRPC123", "AAAAA").catch(e => { /* ignore */})
|
||||||
console.log("unexpected call catch clause");
|
|
||||||
done(e)
|
|
||||||
})
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log("unexpected connect catch clause");
|
console.log("unexpected connect catch clause");
|
||||||
done(e)
|
done(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user