Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

Commit c78899f

Browse files
fix(server): correctly start idle timer
Idle timer was only being triggered for client connections.
1 parent 39f0aea commit c78899f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ export class Connection extends EventEmitter {
282282
this._totalSent = Long.UZERO
283283
this._totalDelivered = Long.UZERO
284284
this._lastPacketExchangeRate = Rational.UZERO
285+
this.once('connect', () => this.startIdleTimer())
285286
}
286287

287288
/**
@@ -338,7 +339,6 @@ export class Connection extends EventEmitter {
338339
}
339340
})
340341
this.closed = false
341-
this.startIdleTimer()
342342
}
343343

344344
/**

0 commit comments

Comments
 (0)