If backend fails and sets session state to SESSION_STATE_STOPPING before session is in state SESSION_STATE_ROUTER_READY, sessoin.c:session_alloc overwrites the session state by SESSION_STATE_ROUTER_READY. Protected session state modification and added check before changing the state.

cloesSession was called in session.c:session_free if all DCBs had been removed their references to session. closeSession, however, is function which handles closing router. Router is responsible for closing all backend DCBs (=connections). Thus, calling sessionClose after all backend connections had been removed already is unnecessary and causes assertion traps.

Simply removed the call.
This commit is contained in:
VilhoRaatikka
2014-06-24 21:59:42 +03:00
parent c30e270768
commit 65c42b93cf
2 changed files with 25 additions and 12 deletions

View File

@ -116,7 +116,8 @@ MODULE_INFO *mod_info = NULL;
LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR,
"Error : Unable to load library for module: "
"%s\n\t\t\t %s.",
"%s\n\n\t\t %s."
"\n\n",
module,
dlerror())));
return NULL;