feat: mention selected port by api client in log messages
This commit is contained in:
@@ -844,6 +844,7 @@ class ApiClient
|
||||
$this->logger->error('Connection retry timeout exceeded', [
|
||||
'elapsed_time' => microtime(true) - $this->operationStartTime,
|
||||
'total_timeout' => $this->config['total_timeout'],
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new TimeoutException('Connection timeout exceeded during retries');
|
||||
}
|
||||
@@ -852,6 +853,7 @@ class ApiClient
|
||||
'error_message' => $errStr,
|
||||
'error_number' => $errNo,
|
||||
'attempt' => $tries,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
++$tries;
|
||||
sleep(1);
|
||||
@@ -865,6 +867,7 @@ class ApiClient
|
||||
'error_message' => $errStr,
|
||||
'error_number' => $errNo,
|
||||
'elapsed_time' => microtime(true) - $this->operationStartTime,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new ApiClientException('Unable to open socket');
|
||||
}
|
||||
@@ -883,6 +886,7 @@ class ApiClient
|
||||
if (microtime(true) - $this->operationStartTime > $this->config['total_timeout']) {
|
||||
$this->logger->error('Total timeout exceeded before send', [
|
||||
'elapsed_time' => microtime(true) - $this->operationStartTime,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new TimeoutException('Total operation timeout exceeded before send');
|
||||
}
|
||||
@@ -913,6 +917,7 @@ class ApiClient
|
||||
'total_timeout' => $totalTimeout,
|
||||
'bytes_received' => strlen($response),
|
||||
'read_attempts' => $readAttempts,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new TimeoutException('Total operation timeout exceeded while receiving data');
|
||||
}
|
||||
@@ -930,6 +935,7 @@ class ApiClient
|
||||
'elapsed_time' => $elapsedTime,
|
||||
'bytes_received' => 0,
|
||||
'read_attempts' => $readAttempts,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new ImmediateConnectionCloseException('Server closed connection immediately - server may be busy');
|
||||
}
|
||||
@@ -938,6 +944,7 @@ class ApiClient
|
||||
'elapsed_time' => $elapsedTime,
|
||||
'bytes_received' => strlen($response),
|
||||
'read_attempts' => $readAttempts,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new TimeoutException('Stream timeout while reading from socket');
|
||||
}
|
||||
@@ -950,6 +957,7 @@ class ApiClient
|
||||
$this->logger->warning('Server closed connection without sending data', [
|
||||
'elapsed_time' => $elapsedTime,
|
||||
'read_attempts' => $readAttempts,
|
||||
'port' => $this->selectedPort,
|
||||
]);
|
||||
throw new ImmediateConnectionCloseException('Server closed connection without sending data');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user