Skip to content

Commit

Permalink
Fix bug with heartbeat handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
codebutler committed Jun 13, 2012
1 parent 78e9456 commit 5f78247
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
15 changes: 10 additions & 5 deletions lib/tapchat/engine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{ {
"name": "tapchat", "name": "tapchat",
"version": "0.0.8", "version": "0.0.9",
"author": { "author": {
"name": "Eric Butler", "name": "Eric Butler",
"email": "eric@codebutler.com" "email": "eric@codebutler.com"
Expand Down
6 changes: 4 additions & 2 deletions src/tapchat/engine.coffee
Expand Up @@ -221,10 +221,12 @@ class Engine


for cid, buffers of seenEids for cid, buffers of seenEids
connection = @findConnection(parseInt(cid)) connection = @findConnection(parseInt(cid))
throw "connection not found: #{cid}" unless connection
for bid, eid of buffers for bid, eid of buffers
do (bid, eid) => buffer = connection.findBuffer(parseInt(bid))
throw "buffer not found: #{bid}" unless buffer
do (buffer, eid) =>
queue.perform (over) => queue.perform (over) =>
buffer = connection.findBuffer(parseInt(bid))
buffer.setLastSeenEid(eid, over) buffer.setLastSeenEid(eid, over)


queue.whenDone => queue.whenDone =>
Expand Down

0 comments on commit 5f78247

Please sign in to comment.