[Pkg-cli-apps-commits] [fsharp] 03/60: Add retry up to 10 seconds when connecting to hosted compiler server. (changeset 1291356)
Christopher Halse Rogers
raof-guest at moszumanska.debian.org
Sun Sep 14 08:13:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
raof-guest pushed a commit to branch master
in repository fsharp.
commit 8358436618c534439be5025f0efe32b5f1a39649
Author: latkin <latkin at microsoft.com>
Date: Thu Jul 3 10:56:13 2014 -0700
Add retry up to 10 seconds when connecting to hosted compiler server. (changeset 1291356)
---
tests/fsharpqa/Source/run.pl | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/tests/fsharpqa/Source/run.pl b/tests/fsharpqa/Source/run.pl
index dcdd826..eb34cab 100644
--- a/tests/fsharpqa/Source/run.pl
+++ b/tests/fsharpqa/Source/run.pl
@@ -378,13 +378,19 @@ sub RunCompilerCommand {
if($ENV{HOSTED_COMPILER_PORT} ne ""){
$port = $ENV{HOSTED_COMPILER_PORT};
}
- my $remote = IO::Socket::INET->new(
- Proto => "tcp",
- PeerAddr => "localhost",
- PeerPort => $port,
- )
- or RunExit(TEST_FAIL, "Unable to connect to hosted compiler \n");
-
+
+ my $attempts = 0;
+ my $remote = undef;
+ until($remote || ($attempts == 10)) {
+ $remote = IO::Socket::INET->new(
+ Proto => "tcp",
+ PeerAddr => "localhost",
+ PeerPort => $port,
+ ) or sleep(1);
+ $attempts++;
+ }
+ RunExit(TEST_FAIL, "Unable to connect to hosted compiler \n") unless $remote;
+
my $currDir = getcwd();
# send current directory and full command line to the compiler host process
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git
More information about the Pkg-cli-apps-commits
mailing list