MXS-2858: Fix backend side throttling

The code registered both client and backend callbacks for backend
DCBs. This caused the whole connection to hang if backend side throtting
was ever triggered.
This commit is contained in:
Markus Mäkelä 2020-01-29 13:52:10 +02:00
parent 08e572b139
commit a311613935
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -174,7 +174,7 @@ DCB::DCB(Role role, MXS_SESSION* session)
authfunc = session->listener->auth_func();
}
if (high_water && low_water)
if (high_water && low_water && role == Role::CLIENT)
{
dcb_add_callback(this, DCB_REASON_HIGH_WATER, downstream_throttle_callback, NULL);
dcb_add_callback(this, DCB_REASON_LOW_WATER, downstream_throttle_callback, NULL);