mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +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:
parent
181829b55c
commit
d806d4fe54
4 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,7 @@ module.exports = syrup.serial()
|
||||||
var plugin = Object.create(null)
|
var plugin = Object.create(null)
|
||||||
|
|
||||||
function FrameProducer(config) {
|
function FrameProducer(config) {
|
||||||
|
EventEmitter.call(this)
|
||||||
this.actionQueue = []
|
this.actionQueue = []
|
||||||
this.runningState = FrameProducer.STATE_STOPPED
|
this.runningState = FrameProducer.STATE_STOPPED
|
||||||
this.desiredState = new StateQueue()
|
this.desiredState = new StateQueue()
|
||||||
|
|
|
@ -3,6 +3,7 @@ var util = require('util')
|
||||||
var EventEmitter = require('eventemitter3').EventEmitter
|
var EventEmitter = require('eventemitter3').EventEmitter
|
||||||
|
|
||||||
function FailCounter(threshold, time) {
|
function FailCounter(threshold, time) {
|
||||||
|
EventEmitter.call(this)
|
||||||
this.threshold = threshold
|
this.threshold = threshold
|
||||||
this.time = time
|
this.time = time
|
||||||
this.values = []
|
this.values = []
|
||||||
|
|
|
@ -3,6 +3,8 @@ var util = require('util')
|
||||||
var EventEmitter = require('eventemitter3').EventEmitter
|
var EventEmitter = require('eventemitter3').EventEmitter
|
||||||
|
|
||||||
function RiskyStream(stream) {
|
function RiskyStream(stream) {
|
||||||
|
EventEmitter.call(this)
|
||||||
|
|
||||||
this.endListener = function() {
|
this.endListener = function() {
|
||||||
this.ended = true
|
this.ended = true
|
||||||
this.stream.removeListener('end', this.endListener)
|
this.stream.removeListener('end', this.endListener)
|
||||||
|
|
|
@ -10,6 +10,7 @@ function TtlItem(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function TtlSet(ttl) {
|
function TtlSet(ttl) {
|
||||||
|
EventEmitter.call(this)
|
||||||
this.head = null
|
this.head = null
|
||||||
this.tail = null
|
this.tail = null
|
||||||
this.mapping = Object.create(null)
|
this.mapping = Object.create(null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue