Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix infinite loop when workspace indexing server fails to initialize"
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,14 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
logger.info { "project context index starting" }
delay(300)
val isIndexSuccess = index()
if (isIndexSuccess) isIndexComplete.set(true)
if (isIndexSuccess) {
isIndexComplete.set(true)
}
return
}
retryCount.incrementAndGet()
} catch (e: Exception) {
logger.warn(e) { "failed to init project context" }
if (e.stackTraceToString().contains("Connection refused")) {
retryCount.incrementAndGet()
delay(10000)
Expand All @@ -133,6 +137,7 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
private suspend fun initEncryption(): Boolean {
val request = encoderServer.getEncryptionRequest()
val response = sendMsgToLsp(LspMessage.Initialize, request)
logger.info { "received response to init encryption: $response"}
return response?.responseCode == 200
}

Expand Down
Loading