Fixed potential bug in realtime startConnection and bugs in note findOrNewNote, response showNote
This commit is contained in:
@@ -394,10 +394,13 @@ function startConnection(socket) {
|
||||
//find or new note
|
||||
Note.findOrNewNote(notename, owner, function (err, note) {
|
||||
if (err) {
|
||||
responseError(res, "404", "Not Found", "oops.");
|
||||
socket.emit('info', {
|
||||
code: 404
|
||||
});
|
||||
socket.disconnect(true);
|
||||
clearSocketQueue(connectionSocketQueue, socket);
|
||||
isConnectionBusy = false;
|
||||
return;
|
||||
return logger.error(err);
|
||||
}
|
||||
|
||||
var body = LZString.decompressFromBase64(data.rows[0].content);
|
||||
|
||||
Reference in New Issue
Block a user