aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/tls/sessions_sql/tls_session_manager_sql.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tls/sessions_sql/tls_session_manager_sql.cpp b/src/lib/tls/sessions_sql/tls_session_manager_sql.cpp
index 4287172f4..45b3059f5 100644
--- a/src/lib/tls/sessions_sql/tls_session_manager_sql.cpp
+++ b/src/lib/tls/sessions_sql/tls_session_manager_sql.cpp
@@ -170,6 +170,9 @@ size_t Session_Manager_SQL::remove_all()
void Session_Manager_SQL::save(const Session& session)
{
+ if(session.server_info().hostname().empty())
+ return;
+
auto stmt = m_db->new_statement("insert or replace into tls_sessions"
" values(?1, ?2, ?3, ?4, ?5)");