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 {
402402 }
403403
404404 if ( this . options . secure ) {
405- // appy changes
406-
405+ // apply changes
407406 Object . keys ( defaultTlsOptions || { } ) . forEach ( key => {
408407 if ( ! ( key in this . options ) ) {
409408 this . options [ key ] = defaultTlsOptions [ key ] ;
410409 }
411410 } ) ;
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+ } ;
420416 }
421417 }
422418
You can’t perform that action at this time.
0 commit comments