File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -402,21 +402,17 @@ class IMAPServer extends EventEmitter {
402
402
}
403
403
404
404
if ( this . options . secure ) {
405
- // appy changes
406
-
405
+ // apply changes
407
406
Object . keys ( defaultTlsOptions || { } ) . forEach ( key => {
408
407
if ( ! ( key in this . options ) ) {
409
408
this . options [ key ] = defaultTlsOptions [ key ] ;
410
409
}
411
410
} ) ;
412
-
413
- // ensure SNICallback method
414
- if ( typeof this . options . SNICallback !== 'function' ) {
415
- // create default SNI handler
416
- this . options . SNICallback = ( servername , cb ) => {
417
- cb ( null , this . secureContext . get ( servername ) ) ;
418
- } ;
419
- }
411
+ } else if ( typeof this . options . SNICallback !== 'function' ) {
412
+ // ensure SNICallback method and create default SNI handler
413
+ this . options . SNICallback = ( servername , cb ) => {
414
+ cb ( null , this . secureContext . get ( servername ) ) ;
415
+ } ;
420
416
}
421
417
}
422
418
You can’t perform that action at this time.
0 commit comments