log client id when disconnecting on otUpdateError

only log errors for connected clients
This commit is contained in:
Brian Gough 2016-11-21 15:33:13 +00:00
parent 5d377713d6
commit e5160d9a36

View file

@ -35,8 +35,8 @@ module.exports = DocumentUpdaterController =
client.emit "otUpdateApplied", update
_processErrorFromDocumentUpdater: (io, doc_id, error, message) ->
logger.error err: error, doc_id: doc_id, "error from document updater"
for client in io.sockets.clients(doc_id)
logger.error err: error, doc_id: doc_id, client_id: client.id, "error from document updater, disconnecting client"
client.emit "otUpdateError", error, message
client.disconnect()