Fix persistent connection debug assertion

The assertion was done before the DCB was assigned.
This commit is contained in:
Markus Mäkelä
2019-03-28 09:56:57 +02:00
parent abd6e0924f
commit f6219d1a80

View File

@ -323,11 +323,13 @@ DCB* Server::get_persistent_dcb(const string& user, const string& ip, const stri
&& server->persistent[id] // Check after cleaning
&& (server->status & SERVER_RUNNING))
{
mxb_assert(dcb->server);
dcb = server->persistent[id];
while (dcb)
{
mxb_assert(dcb->role == DCB::Role::BACKEND);
mxb_assert(dcb->server);
if (dcb->user
&& dcb->remote
&& !ip.empty()