json stringify erros
This commit is contained in:
parent
0dcf44ded3
commit
7547f5f1ae
@ -79,7 +79,7 @@ PeerServer.prototype._initializeWSS = function() {
|
||||
socket.send(JSON.stringify({ type: 'OPEN' }));
|
||||
self._configureWS(socket, key, id, token);
|
||||
} else {
|
||||
socket.send({ type: 'ERROR', payload: { msg: err } });
|
||||
socket.send(JSON.stringify({ type: 'ERROR', payload: { msg: err } }));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -215,7 +215,7 @@ PeerServer.prototype._initializeHTTP = function() {
|
||||
self._ips[ip]++;
|
||||
self._startStreaming(res, key, id, token, true);
|
||||
} else {
|
||||
res.send({ type: 'ERROR', payload: { msg: err } });
|
||||
res.send(JSON.stringify({ type: 'HTTP-ERROR' }));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user