This commit adds code that detects ECONNREFUSED and dispatches appropriate
event further in Async messenger.
Signed-off-by: Piotr Dałek <git@predictor.org.pl>
r = cs.is_connected();
if (r < 0) {
ldout(async_msgr->cct, 1) << __func__ << " reconnect failed " << dendl;
+ if (r == -ECONNREFUSED) {
+ ldout(async_msgr->cct, 2) << __func__ << " connection refused!" << dendl;
+ dispatch_queue->queue_refused(this);
+ }
goto fail;
} else if (r == 0) {
ldout(async_msgr->cct, 10) << __func__ << " nonblock connect inprogress" << dendl;