mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
fix(long-polling): API changes require ignoring \ns!
This commit is contained in:
parent
36be4cd497
commit
32db92e52a
|
@ -120,6 +120,8 @@ class InboxLongConnection
|
||||||
processBufferThrottled = _.throttle(@onProcessBuffer, 400, {leading: false})
|
processBufferThrottled = _.throttle(@onProcessBuffer, 400, {leading: false})
|
||||||
res.on 'close', => @retry()
|
res.on 'close', => @retry()
|
||||||
res.on 'data', (chunk) =>
|
res.on 'data', (chunk) =>
|
||||||
|
# Ignore characters sent as pings
|
||||||
|
return if chunk is '\n'
|
||||||
@_buffer += chunk
|
@_buffer += chunk
|
||||||
processBufferThrottled()
|
processBufferThrottled()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue