diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-02-16 22:36:33 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-02-16 22:36:33 -0500 |
commit | c66c279fb65328c5a5f5d8ca6e0df035fc5c5555 (patch) | |
tree | 09c2930bced82d7ea8ffd543ca8cbf73fdfafb71 | |
parent | e5d8d42eae6ce486678d87e33c1a7c26e2a6c1a1 (diff) | |
download | verbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.tar.gz verbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.tar.bz2 verbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.zip |
Added optional database query timeout
-rw-r--r-- | lib/database.cpp | 5 | ||||
-rw-r--r-- | lib/database.h | 2 | ||||
m--------- | vendor/hkutil | 0 |
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/database.cpp b/lib/database.cpp index d5ff37e..d30926c 100644 --- a/lib/database.cpp +++ b/lib/database.cpp | |||
@@ -85,6 +85,11 @@ namespace verbly { | |||
85 | return result; | 85 | return result; |
86 | } | 86 | } |
87 | 87 | ||
88 | void database::setTimeout(int ms) | ||
89 | { | ||
90 | ppdb_.setTimeout(ms); | ||
91 | } | ||
92 | |||
88 | std::string database_version_mismatch::generateMessage(int right, int wrong) | 93 | std::string database_version_mismatch::generateMessage(int right, int wrong) |
89 | { | 94 | { |
90 | std::ostringstream msgbuilder; | 95 | std::ostringstream msgbuilder; |
diff --git a/lib/database.h b/lib/database.h index 83c4c1c..a9d711e 100644 --- a/lib/database.h +++ b/lib/database.h | |||
@@ -73,6 +73,8 @@ namespace verbly { | |||
73 | 73 | ||
74 | std::set<std::string> synrestrs(int partId) const; | 74 | std::set<std::string> synrestrs(int partId) const; |
75 | 75 | ||
76 | void setTimeout(int ms); | ||
77 | |||
76 | private: | 78 | private: |
77 | 79 | ||
78 | mutable hatkirby::database ppdb_; | 80 | mutable hatkirby::database ppdb_; |
diff --git a/vendor/hkutil b/vendor/hkutil | |||
Subproject fdddefbbbb8f3c0bd223280c74fa7e05bfdc352 | Subproject ade8cc43b138fb776c16fe2b4de18c92e148c9c | ||