4295: Fixed tests
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 23 Oct 2014 19:29:09 +0000 (15:29 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 23 Oct 2014 19:29:09 +0000 (15:29 -0400)
services/api/lib/eventbus.rb

index 080138ba4c8961d588bc8b9bd28a1dc47c283854..a0c0b272e77d9a62b3b0d086418329e644549117 100644 (file)
@@ -123,7 +123,7 @@ class EventBus
           # another query to get more logs (will start from last_log_id
           # reported by current query)
           @channel.push nil
-        elsif !notify_id.nil? and notify_id > ws.last_log_id
+        elsif !notify_id.nil? and (ws.last_log_id.nil? or notify_id > ws.last_log_id)
           # Number of rows returned was less than cap, but the notify id is
           # higher than the last id visible to the client, so update last_log_id
           ws.last_log_id = notify_id