Skip to content

Commit

Permalink
Update faye_ttl.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
branch14 committed Jul 29, 2014
1 parent dcb87a6 commit 0ce2401
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/faye_ttl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def outgoing(message, callback)
if subscription.start_with?(*channels)
messages = history[subscription]
unless messages.empty?
# TODO move this into the incoming message handler
messages = messages.delete_if do |m|
(Time.now.to_i - m['timestamp']) > ttl
end
Expand Down

0 comments on commit 0ce2401

Please sign in to comment.