Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8358436

Browse files
committed
Add retry up to 10 seconds when connecting to hosted compiler server. (changeset 1291356)
1 parent0ed4da4 commit8358436

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

‎tests/fsharpqa/Source/run.pl‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,19 @@ sub RunCompilerCommand {
378378
if($ENV{HOSTED_COMPILER_PORT}ne""){
379379
$port =$ENV{HOSTED_COMPILER_PORT};
380380
}
381-
my$remote = IO::Socket::INET->new(
382-
Proto=>"tcp",
383-
PeerAddr=>"localhost",
384-
PeerPort=>$port,
385-
)
386-
or RunExit(TEST_FAIL,"Unable to connect to hosted compiler\n");
387-
381+
382+
my$attempts = 0;
383+
my$remote =undef;
384+
until($remote || ($attempts == 10)) {
385+
$remote = IO::Socket::INET->new(
386+
Proto=>"tcp",
387+
PeerAddr=>"localhost",
388+
PeerPort=>$port,
389+
)orsleep(1);
390+
$attempts++;
391+
}
392+
RunExit(TEST_FAIL,"Unable to connect to hosted compiler\n")unless$remote;
393+
388394
my$currDir = getcwd();
389395

390396
# send current directory and full command line to the compiler host process

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp