MXS-619: Allow backend authentication to complete

By deferring the closing of a DCB until the protocol tells that it's in a
stable state, we avoid closing the connection mid-authentication. This
makes sure that all connections have reached a stable state before they
are closed which in turn prevents the connections from counting towards
aborted connects (or failed authentications like it did with the old fix).
This commit is contained in:
Markus Mäkelä
2020-07-01 10:21:07 +03:00
parent ae2cad9254
commit a655c5d08c
4 changed files with 64 additions and 4 deletions

View File

@ -30,11 +30,17 @@ int64_t mxs_clock();
/**
* Convert heartbeats to seconds
*/
#define MXS_CLOCK_TO_SEC(a) ((int64_t)a / 10)
static inline int64_t MXS_CLOCK_TO_SEC(int64_t a)
{
return a / 10;
}
/**
* Convert seconds to heartbeats
*/
#define MXS_SEC_TO_CLOCK(a) ((int64_t)a * 10)
static inline int64_t MXS_SEC_TO_CLOCK(int64_t a)
{
return a * 10;
}
MXS_END_DECLS