We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec1f498 commit 9efb423Copy full SHA for 9efb423
1 file changed
src/client/providers/jediProxy.ts
@@ -181,6 +181,7 @@ function handleError(source: string, errorMessage: string) {
181
logger.error(source + ' jediProxy', `Error (${source}) ${errorMessage}`);
182
}
183
184
+let spawnRetryAttempts = 0;;
185
function spawnProcess(dir: string) {
186
try {
187
let environmentVariables = { 'PYTHONUNBUFFERED': '1' };
@@ -224,6 +225,11 @@ function spawnProcess(dir: string) {
224
225
});
226
proc.on("error", error => {
227
handleError("error", error + '');
228
+ spawnRetryAttempts++;
229
+ if (spawnRetryAttempts < 10 && error && error.message &&
230
+ error.message.indexOf('This socket has been ended by the other party') >= 0) {
231
+ spawnProcess(dir);
232
+ }
233
234
proc.stdout.setEncoding('utf8');
235
proc.stdout.on("data", (data: string) => {
0 commit comments