|
@@ -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 {
|