File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -615,6 +615,12 @@ export class K8 {
615
615
this . logger . debug ( `copyFrom.callback(status)=${ status } ` )
616
616
} )
617
617
. then ( conn => {
618
+ conn . on ( 'error' , ( e ) => {
619
+ self . _deleteTempFile ( tmpFile )
620
+ return reject ( new FullstackTestingError (
621
+ `failed copying from ${ podName } :${ srcDir } /${ srcFile } to ${ destPath } because of connection error: ${ e . message } ` , e ) )
622
+ } )
623
+
618
624
conn . on ( 'close' , ( code , reason ) => {
619
625
this . logger . debug ( `connection closed copying from ${ podName } :${ srcDir } /${ srcFile } to ${ destPath } ` )
620
626
if ( code !== 1000 ) { // code 1000 is the success code
@@ -667,12 +673,6 @@ export class K8 {
667
673
return resolve ( true )
668
674
}
669
675
} )
670
-
671
- conn . on ( 'error' , ( e ) => {
672
- self . _deleteTempFile ( tmpFile )
673
- return reject ( new FullstackTestingError (
674
- `failed copying from ${ podName } :${ srcDir } /${ srcFile } to ${ destPath } because of connection error: ${ e . message } ` , e ) )
675
- } )
676
676
} )
677
677
678
678
errStream . on ( 'data' , ( data ) => {
You can’t perform that action at this time.
0 commit comments