ws error on send

node might throw an error on sending through a websocket that is not open. Adding an empty calback seems o fix this
This commit is contained in:
Stefdv 2016-09-17 23:13:30 +02:00 committed by GitHub
parent 562e1dba96
commit 1760900d73

2
gun.js
View File

@ -1350,7 +1350,7 @@
if(res.body || res.end){ delete r.ws.cbs[req.headers['ws-rid']] }
cb(err,res);
}
ws.send(JSON.stringify(req),function(err) {});
ws.send(JSON.stringify(req),function(err){})
return true;
}
if(ws === false){ return }