File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ export class AtelierAPI {
215
215
} )
216
216
. catch ( ( error ) => {
217
217
if ( error . error && error . error . code === "ECONNREFUSED" ) {
218
- setTimeout ( checkConnection , 1000 ) ;
218
+ setTimeout ( checkConnection , 30000 ) ;
219
219
}
220
220
console . error ( error ) ;
221
221
throw error ;
Original file line number Diff line number Diff line change @@ -492,5 +492,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
492
492
export function deactivate ( ) : void {
493
493
// This will ensure all pending events get flushed
494
494
reporter . dispose ( ) ;
495
- terminal . dispose ( ) ;
495
+ if ( terminal ) {
496
+ terminal . dispose ( ) ;
497
+ }
496
498
}
Original file line number Diff line number Diff line change @@ -183,18 +183,16 @@ export async function terminalWithDocker(): Promise<vscode.Terminal> {
183
183
const workspace = currentWorkspaceFolder ( ) ;
184
184
185
185
const terminalName = `ObjectScript:${ workspace } ` ;
186
- let terminal = vscode . window . terminals . find ( ( el ) => el . name === terminalName && el . exitStatus == undefined ) ;
187
- if ( ! terminal ) {
188
- terminal = vscode . window . createTerminal ( terminalName , "docker-compose" , [
189
- "-f" ,
190
- file ,
191
- "exec" ,
192
- service ,
193
- "/bin/bash" ,
194
- "-c" ,
195
- `command -v iris >/dev/null 2>&1 && iris session $ISC_PACKAGE_INSTANCENAME -U ${ ns } || ccontrol session $ISC_PACKAGE_INSTANCENAME -U ${ ns } ` ,
196
- ] ) ;
197
- }
198
- terminal . show ( ) ;
186
+ const terminal = vscode . window . createTerminal ( terminalName , "docker-compose" , [
187
+ "-f" ,
188
+ file ,
189
+ "exec" ,
190
+ service ,
191
+ "/bin/bash" ,
192
+ "-c" ,
193
+ `[ -f /tmp/vscodesession.pid ] && kill $(cat /tmp/vscodesession.pid) >/dev/null 2>&1 ; echo $$ > /tmp/vscodesession.pid;
194
+ $(command -v ccontrol || command -v iris) session $ISC_PACKAGE_INSTANCENAME -U ${ ns } ` ,
195
+ ] ) ;
196
+ terminal . show ( true ) ;
199
197
return terminal ;
200
198
}
You can’t perform that action at this time.
0 commit comments