]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-sql: When adding more connections to sql pool, connect to them immediately.
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Mar 2011 17:51:44 +0000 (19:51 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Mar 2011 17:51:44 +0000 (19:51 +0200)
src/lib-sql/driver-sqlpool.c

index 237270815220baca49a9f72a1b916400c4d1378c..939fa9f7e7fa8cdebab8a5d25304e6158988d33b 100644 (file)
@@ -356,6 +356,8 @@ driver_sqlpool_get_connection(struct sqlpool_db *db,
        if (conn == NULL) {
                /* still nothing. try creating new connections */
                conn = sqlpool_add_new_connection(db);
+               if (conn != NULL)
+                       (void)sql_connect(conn->db);
                if (conn == NULL || !SQL_DB_IS_READY(conn->db))
                        return FALSE;
        }