Added configurable timeouts for the embedded MySQL connections.
This commit is contained in:
Markus Makela
2015-09-07 18:51:01 +03:00
parent ee19fbd41b
commit 5350a85e2b
5 changed files with 61 additions and 30 deletions

View File

@ -42,6 +42,11 @@
#define USERS_REFRESH_TIME 30 /* Allowed time interval (in seconds) after last update*/
#define USERS_REFRESH_MAX_PER_TIME 4 /* Max number of load calls within the time interval */
/** Default timeout values used by the connections which fetch user authentication data */
#define DEFAULT_AUTH_CONNECT_TIMEOUT 3
#define DEFAULT_AUTH_READ_TIMEOUT 1
#define DEFAULT_AUTH_WRITE_TIMEOUT 2
/* Max length of fields in the mysql.user table */
#define MYSQL_USER_MAXLEN 128
#define MYSQL_PASSWORD_LEN 41