From 2958531715494f5595887489ba693fd876d88adb Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Fri, 20 Apr 2018 12:42:45 +0000
Subject: [PATCH] 修正在Visual Studio 2017下的编译错误。 处理连接池在连接失败时的异常。
---
include/qtl_database_pool.hpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/include/qtl_database_pool.hpp b/include/qtl_database_pool.hpp
index 1d04e2f..73ca349 100644
--- a/include/qtl_database_pool.hpp
+++ b/include/qtl_database_pool.hpp
@@ -29,7 +29,14 @@
if(m_background_thread.joinable())
{
m_stop_thread=true;
- m_background_thread.join();
+ try
+ {
+ m_background_thread.join();
+ }
+ catch (std::system_error&)
+ {
+ //igore the error
+ }
}
clear();
}
--
Gitblit v1.9.3