aboutsummaryrefslogtreecommitdiff
path: root/src/proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/proxy.c')
-rw-r--r--src/proxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/proxy.c b/src/proxy.c
index 5718a8a..7d410db 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include "client.h"
+#include "mysql.h"
#include "proxy.h"
#include "state.h"
@@ -201,6 +202,8 @@ void handle_proxy_session(ssh_event event, ssh_session session, ssh_channel my_c
ssh_callbacks_init(&channel_cb);
ssh_set_channel_callbacks(my_channel, &channel_cb);
+ db_clean(); // we close the mysql connection before the main loop, as to not waste ressources
+
do {
/* Poll the main event which takes care of the sessions and channels */
if (ssh_event_dopoll(event, -1) == SSH_ERROR) {