Skip to content

Commit 27aa993

Browse files
authored
fix(amazonq): remove pointless timeout on initialize (#5687)
5 second constraint is on encryption parameters, not the initialize request
1 parent 475dfc8 commit 27aa993

File tree

1 file changed

+1
-7
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp

1 file changed

+1
-7
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import com.intellij.util.animation.consumer
2424
import com.intellij.util.io.await
2525
import kotlinx.coroutines.CoroutineScope
2626
import kotlinx.coroutines.Deferred
27-
import kotlinx.coroutines.TimeoutCancellationException
2827
import kotlinx.coroutines.async
2928
import kotlinx.coroutines.future.asCompletableFuture
3029
import kotlinx.coroutines.runBlocking
@@ -334,12 +333,7 @@ private class AmazonQServerInstance(private val project: Project, private val cs
334333
encryptionManager.writeInitializationPayload(launcherHandler.process.outputStream)
335334

336335
val initializeResult = try {
337-
withTimeout(5.seconds) {
338-
languageServer.initialize(createInitializeParams()).await()
339-
}
340-
} catch (_: TimeoutCancellationException) {
341-
LOG.warn { "LSP initialization timed out" }
342-
null
336+
languageServer.initialize(createInitializeParams()).await()
343337
} catch (e: Exception) {
344338
LOG.warn(e) { "LSP initialization failed" }
345339
null

0 commit comments

Comments
 (0)