Disabled connection_timeout because it's unsafe to use

The current implementation of the session timeout functionality is not safe to
use. Added a warning to the documentation and disabled the code. If the user
tries to use it, a warning is logged.
This commit is contained in:
Markus Makela
2016-01-15 16:38:15 +02:00
parent c1a906a60d
commit b470ebe732
3 changed files with 10 additions and 1 deletions

View File

@ -66,6 +66,7 @@
#include <gw.h>
#include <gwdirs.h>
#include <math.h>
#include <version.h>
static RSA *rsa_512 = NULL;
static RSA *rsa_1024 = NULL;
@ -1103,8 +1104,12 @@ serviceSetTimeout(SERVICE *service, int val)
{
return 0;
}
#ifdef UNSAFE_CODE
service->conn_timeout = val;
#else
MXS_WARNING("The `connection_timeout` parameter is not safe for use. "
"The functionality is disabled for MaxScale "MAXSCALE_VERSION".");
#endif
return 1;
}