Skip to content

Commit

Permalink
Call getAuthenticationState on a pooled thread instead of EDT (#1996)
Browse files Browse the repository at this point in the history
No need to call this method on EDT (at least not there).

## Test plan
1. `runIde`
2. verify that the error does not appear in the logs
  • Loading branch information
mkondratek authored Aug 7, 2024
1 parent bfeafca commit 8edc00e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.sourcegraph.cody.config

import com.intellij.collaboration.async.CompletableFutureUtil.submitIOTask
import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.ModalityState
import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.Service
Expand Down Expand Up @@ -83,7 +84,7 @@ class CodyAuthenticationManager(val project: Project) :
object : WindowAdapter() {
override fun windowActivated(e: WindowEvent?) {
super.windowActivated(e)
getAuthenticationState()
ApplicationManager.getApplication().executeOnPooledThread { getAuthenticationState() }
}
}
frame?.addWindowListener(listener)
Expand Down

0 comments on commit 8edc00e

Please sign in to comment.