Fix for reconnection issues in invoke_request in case the hostname is
empty.