From 32db92e52a1093105e061315ccfef7084e6aa756 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 12 May 2015 15:33:08 -0700 Subject: [PATCH] fix(long-polling): API changes require ignoring \ns! --- src/flux/inbox-long-connection.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flux/inbox-long-connection.coffee b/src/flux/inbox-long-connection.coffee index 16790fb5e..a6a1a8828 100644 --- a/src/flux/inbox-long-connection.coffee +++ b/src/flux/inbox-long-connection.coffee @@ -28,10 +28,10 @@ class InboxLongConnection , 1000 @ - + namespaceId: -> @_namespaceId - + hasCursor: -> !!atom.config.get(@_cursorKey) @@ -120,6 +120,8 @@ class InboxLongConnection processBufferThrottled = _.throttle(@onProcessBuffer, 400, {leading: false}) res.on 'close', => @retry() res.on 'data', (chunk) => + # Ignore characters sent as pings + return if chunk is '\n' @_buffer += chunk processBufferThrottled()