瀏覽代碼

check for a valid counter value in event log

Brian Gough 7 年之前
父節點
當前提交
57c5ec14bd
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      services/real-time/app/coffee/EventLogger.coffee

+ 1 - 1
services/real-time/app/coffee/EventLogger.coffee

@@ -15,7 +15,7 @@ module.exports = EventLogger =
 		return if typeof(message_id) isnt 'string'
 		return if typeof(message_id) isnt 'string'
 		[key, count] = message_id.split("-", 2)
 		[key, count] = message_id.split("-", 2)
 		count = parseInt(count, 10)
 		count = parseInt(count, 10)
-		if !count # ignore checks if counter is not present
+		if !(count >= 0)# ignore checks if counter is not present
 			return
 			return
 		# store the last count in a hash for each host
 		# store the last count in a hash for each host
 		previous = EventLogger._storeEventCount(key, count)
 		previous = EventLogger._storeEventCount(key, count)