Commit 03e029ad authored by Magnus Svensson's avatar Magnus Svensson

WL#4189 mtr, hang if worker fails before connected to server

parent ab862def
......@@ -612,6 +612,16 @@ sub run_worker ($) {
$SIG{INT}= sub { exit(1); };
# Connect to server
my $server = new IO::Socket::INET
(
PeerAddr => 'localhost',
PeerPort => $server_port,
Proto => 'tcp'
);
mtr_error("Could not connect to server at port $server_port: $!")
unless $server;
# --------------------------------------------------------------------------
# Set worker name
# --------------------------------------------------------------------------
......@@ -634,16 +644,6 @@ sub run_worker ($) {
environment_setup();
# Connect to server
my $server = new IO::Socket::INET
(
PeerAddr => 'localhost',
PeerPort => $server_port,
Proto => 'tcp'
);
mtr_error("Could not connect to server at port $server_port: $!")
unless $server;
# Read hello from server which it will send when shared
# resources have been setup
my $hello= <$server>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment