mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-24 23:05:22 +02:00
EventEmitter constructor was not being called in many places. It did work due to the EventEmitter3 constructor being empty, but we can't rely on that.
This commit is contained in:
@@ -3,6 +3,7 @@ var util = require('util')
|
||||
var EventEmitter = require('eventemitter3').EventEmitter
|
||||
|
||||
function FailCounter(threshold, time) {
|
||||
EventEmitter.call(this)
|
||||
this.threshold = threshold
|
||||
this.time = time
|
||||
this.values = []
|
||||
|
||||
@@ -3,6 +3,8 @@ var util = require('util')
|
||||
var EventEmitter = require('eventemitter3').EventEmitter
|
||||
|
||||
function RiskyStream(stream) {
|
||||
EventEmitter.call(this)
|
||||
|
||||
this.endListener = function() {
|
||||
this.ended = true
|
||||
this.stream.removeListener('end', this.endListener)
|
||||
|
||||
@@ -10,6 +10,7 @@ function TtlItem(value) {
|
||||
}
|
||||
|
||||
function TtlSet(ttl) {
|
||||
EventEmitter.call(this)
|
||||
this.head = null
|
||||
this.tail = null
|
||||
this.mapping = Object.create(null)
|
||||
|
||||
Reference in New Issue
Block a user