File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export function Networks() {
36
36
37
37
async function connect ( ) {
38
38
try {
39
+ consoleAddLine ( `Connecting to network: ${ networkId } ` ) ;
39
40
const pid = await clientStart ( ) ;
40
41
setClientPid ( pid ) ;
41
42
setMessage ( "info" , "" ) ;
@@ -45,13 +46,15 @@ export function Networks() {
45
46
} catch ( error : any ) {
46
47
log . error ( `${ error } ` ) ;
47
48
setMessage ( "error" , `${ error } ` ) ;
49
+ consoleAddLine ( `${ error } ` ) ;
48
50
}
49
51
}
50
52
51
53
async function disconnect ( ) {
52
54
try {
53
55
await clientStop ( ) ;
54
56
setMessage ( "info" , "Disconnected from Network" ) ;
57
+ consoleAddLine ( `Disconnected from network: ${ networkId } ` ) ;
55
58
} catch ( error : any ) {
56
59
log . error ( `${ error } ` ) ;
57
60
setMessage ( "error" , `${ error } ` ) ;
@@ -156,12 +159,14 @@ export function Networks() {
156
159
} ) ;
157
160
const o = ( d : string ) => `${ d . trim ( ) } ` ;
158
161
log . debug ( `spawning command: ${ cmd } ${ args . join ( " " ) } ` ) ;
162
+
159
163
command . on ( "close" , ( data ) => {
160
164
// normal: code=null signal=9
161
165
// error: code=2 signal=null
162
166
log . debug ( `closed: ${ cmd } code=${ data . code } signal=${ data . signal } ` ) ;
163
167
if ( data . code !== null ) {
164
168
setMessage ( "error" , "Error: Network connection failed." ) ;
169
+ consoleAddLine ( `Network connection failed: ${ networkId } ` ) ;
165
170
}
166
171
setClientPid ( 0 ) ;
167
172
setIsConnected ( false ) ;
You can’t perform that action at this time.
0 commit comments