Skip to content

Commit cf2f5bc

Browse files
committed
chore: improved logging around poller canceling
1 parent 0df8c59 commit cf2f5bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,15 @@ class CoderRemoteProvider(
400400
context.secrets.storeTokenFor(client.url, context.secrets.lastToken)
401401
context.logger.info("Deployment URL and token were stored and will be available for automatic connection")
402402
this.client = client
403-
pollJob?.cancel()
404-
context.logger.info("Previous poll job was canceled")
403+
pollJob?.let {
404+
it.cancel()
405+
context.logger.info("Workspace poll job with reference ${pollJob} was canceled")
406+
}
405407
environments.showLoadingMessage()
406408
coderHeaderPage.setTitle(context.i18n.pnotr(client.url.toString()))
407409
context.logger.info("Displaying ${client.url} in the UI")
408410
pollJob = poll(client, cli)
409-
context.logger.info("Workspace poller job created with reference $pollJob")
411+
context.logger.info("Workspace poll job created with reference $pollJob")
410412
context.envPageManager.showPluginEnvironmentsPage()
411413
}
412414

0 commit comments

Comments
 (0)