Skip to content

Commit f478dba

Browse files
committed
Fix write unsafe exception
- raised when reading the password - fixed by forcing the askPassword to always execute on main dispatcher (the EDT thread)
1 parent 436e607 commit f478dba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/com/coder/gateway/views/steps/CoderAuthStepView.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ class CoderAuthStepView : CoderWorkspacesWizardStep, Disposable {
8181
}
8282

8383
override suspend fun onNext(wizardModel: CoderWorkspacesWizardModel) {
84-
model.password = askPassword(
84+
val password = askPassword(
8585
null,
8686
CoderGatewayBundle.message("gateway.connector.view.login.credentials.dialog.title"),
8787
CoderGatewayBundle.message("gateway.connector.view.login.password.label"),
8888
CredentialAttributes("Coder"),
8989
true
9090
)
91+
92+
model.password = password
9193
withContext(Dispatchers.IO) {
9294
coderClient.initClientSession(model.uriScheme, model.host, model.port, model.email, model.password!!)
9395
}

0 commit comments

Comments
 (0)