Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Add delay to debug connection
Browse files Browse the repository at this point in the history
Work around for failures in first Delve
calls after connection, especailly on Linux.
  • Loading branch information
lukehoban committed Dec 12, 2015
1 parent 112f0b4 commit 69f7815
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ class Delve {
var client = Client.$create(2345, '127.0.0.1');
client.connectSocket((err, conn) => {
if (err) return reject(err);
resolve(conn);
// Add a slight delay to avoid issues on Linux with
// Delve failing calls made shortly after connection.
setTimeout(() =>
resolve(conn),
200);
});
}

Expand Down

0 comments on commit 69f7815

Please sign in to comment.