File tree 2 files changed +6
-10
lines changed
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -258,13 +258,9 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
258
258
stream . on ( 'close' , ( ) => this . handleIssue ( { isClose : true } ) ) ;
259
259
260
260
stream . on ( 'timeout' , ( ) => {
261
- if ( this . delayedTimeoutErrorId != null ) {
262
- this . delayedTimeoutErrorId . refresh ( ) ;
263
- } else {
264
- this . delayedTimeoutErrorId = setTimeout ( ( ) => {
265
- this . handleIssue ( { isTimeout : true , destroy : true } ) ;
266
- } , 1 ) ;
267
- }
261
+ this . delayedTimeoutErrorId = setTimeout ( ( ) => {
262
+ this . handleIssue ( { isTimeout : true , destroy : true } ) ;
263
+ } , 1 ) ;
268
264
} ) ;
269
265
270
266
// hook the message stream up to the passed in stream
@@ -722,6 +718,7 @@ function messageHandler(conn: Connection) {
722
718
return function messageHandler ( message : BinMsg | Response ) {
723
719
if ( conn . delayedTimeoutErrorId != null ) {
724
720
clearTimeout ( conn . delayedTimeoutErrorId ) ;
721
+ conn . delayedTimeoutErrorId = null ;
725
722
}
726
723
727
724
// always emit the message, in case we are streaming
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ export function makeTestFunction(config: DeprecateOptionsConfig) {
13
13
}
14
14
15
15
export function ensureCalledWith ( stub : any , args : any [ ] ) {
16
- // @ts -expect-error: sinonChai plugin
17
16
args . forEach ( ( m : any ) => expect ( stub ) . to . have . been . calledWith ( m ) ) ;
18
17
}
19
18
@@ -33,7 +32,7 @@ ClassWithLogger.prototype.getLogger = function () {
33
32
} ;
34
33
35
34
// creation of class without a logger
36
- function ClassWithoutLogger ( ) {
35
+ export function ClassWithoutLogger ( ) {
37
36
// empty function for class
38
37
}
39
38
@@ -44,7 +43,7 @@ ClassWithoutLogger.prototype.f = makeTestFunction({
44
43
} ) ;
45
44
46
45
// creation of class where getLogger returns undefined
47
- function ClassWithUndefinedLogger ( ) {
46
+ export function ClassWithUndefinedLogger ( ) {
48
47
// empty function for class
49
48
}
50
49
You can’t perform that action at this time.
0 commit comments