Changeset 27398

Show
Ignore:
Timestamp:
23.05.2013 13:12:05 (6 years ago)
Author:
jmt12
Message:

Adding a flag so we can indicate to a client that is it the first one trying to connect to a server - so we can suppress the 'TCP Exhausted' message, and instead just wait a little longer

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/perllib/TDBClient.pm

    r26992 r27398  
    1717sub new 
    1818{ 
    19   my ($class, $server_lockfile_path, $infodb_file) = @_; 
     19  my ($class, $server_lockfile_path, $infodb_file, $we_started_server) = @_; 
    2020  my $self = {}; 
    2121 
     
    4646    my $port = $2; 
    4747    # We now create a client that can connect to the specified port 
    48     print " * Creating TDBClient and connecting to " . $host . ":" . $port . "...\n"; 
    49     $self->{'tdb_client_handle'} = SocketsSwimmingThreadPoolClient->new(host=>$host,port=>$port); 
     48    if ($debug) 
     49    { 
     50      print " * Creating Client and connecting to " . $host . ":" . $port . "...\n"; 
     51    } 
     52    $self->{'tdb_client_handle'} = SocketsSwimmingThreadPoolClient->new(host=>$host, port=>$port, firstcaller=>$we_started_server); 
    5053  } 
    5154  else