Change abort to error message when read connection router finds mismatch between router client session DCB and given backend DCB; improve order of actions when closing DCB in read-write router.

This commit is contained in:
counterpoint
2015-09-15 15:22:44 +01:00
parent 0cf4b2cf68
commit fdbe070e80
2 changed files with 15 additions and 8 deletions

View File

@ -3655,10 +3655,10 @@ static bool select_connect_backend_servers(
ss_dassert(backend_ref[i].bref_backend->backend_conn_count > 0);
/** disconnect opened connections */
dcb_close(backend_ref[i].bref_dcb);
bref_clear_state(&backend_ref[i], BREF_IN_USE);
/** Decrease backend's connection counter. */
atomic_add(&backend_ref[i].bref_backend->backend_conn_count, -1);
dcb_close(backend_ref[i].bref_dcb);
}
}
}