You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -123,11 +123,19 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
123
123
}
124
124
retryCount.incrementAndGet()
125
125
} catch (e:Exception) {
126
-
logger.warn(e) { "failed to init project context" }
127
126
if (e.stackTraceToString().contains("Connection refused")) {
128
-
retryCount.incrementAndGet()
129
-
delay(10000)
127
+
if (encoderServer.isNodeProcessRunning()) {
128
+
// there is a chance that client throws java.net.ConnectException: Connection refused
129
+
// in this case, the server is busy doing tree sitter parsing
130
+
// and will be responsive later once it goes past the tree sitter parsing phrase.
131
+
// Long term solution is to move encode server to LSP protocol
132
+
return
133
+
} else {
134
+
retryCount.incrementAndGet()
135
+
delay(10000)
136
+
}
130
137
} else {
138
+
logger.warn(e) { "failed to init project context" }
0 commit comments