diff --git a/include/PgSQL_Data_Stream.h b/include/PgSQL_Data_Stream.h index 9193be3cf..1e7ee765a 100644 --- a/include/PgSQL_Data_Stream.h +++ b/include/PgSQL_Data_Stream.h @@ -225,8 +225,8 @@ public: // - without ssl: we use the file descriptor from pgsql connection // - with ssl: we use the SSL structure from pgsql connection if (myconn->is_connected() && myconn->get_pg_ssl_in_use()) { - encrypted = true; if (ssl == NULL) { + encrypted = true; SSL* ssl_obj = myconn->get_pg_ssl_object(); if (ssl_obj == NULL) assert(0); // Should not be null ssl = ssl_obj;