X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ede5927555814a1da45d4755a760fc07243ad9ae..114e097d3658e41e7946b5d5ba1ad2ffdc7fe2d9:/projects/rlm_stg/iface.cpp diff --git a/projects/rlm_stg/iface.cpp b/projects/rlm_stg/iface.cpp index d8736608..7394e288 100644 --- a/projects/rlm_stg/iface.cpp +++ b/projects/rlm_stg/iface.cpp @@ -89,6 +89,13 @@ STG_RESULT stgRequest(STG_CLIENT::TYPE type, const char* userName, const char* p return emptyResult(); } try { + if (!client->connected()) + { + if (!STG_CLIENT::reconnect()) + return emptyResult(); + client = STG_CLIENT::get(); + } + response.done = false; client->request(type, toString(userName), toString(password), fromSTGPairs(pairs)); pthread_mutex_lock(&response.mutex); while (!response.done)