diff options
author | Determinant <ted.sybil@gmail.com> | 2019-07-03 00:42:21 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-07-03 00:42:21 -0400 |
commit | 2ef9c99438e5c87651332f47c98da8d397b030e3 (patch) | |
tree | 7c79da536fa4b7b26c5fd595abfb944061a9ca33 /include/salticidae/conn.h | |
parent | b7e06f0f00710765113bbc560fcbaf39e466cbce (diff) |
throw exception when attempt to call on stopped ThreadCall
Diffstat (limited to 'include/salticidae/conn.h')
-rw-r--r-- | include/salticidae/conn.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 0058274..6b9b486 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -460,13 +460,13 @@ class ConnPool { disp_tcall = workers[0].get_tcall(); workers[0].set_dispatcher(); disp_error_cb = [this](const std::exception_ptr err) { + workers[0].stop_tcall(); + disp_ec.stop(); user_tcall->async_call([this, err](ThreadCall::Handle &) { stop_workers(); //std::rethrow_exception(err); if (error_cb) error_cb(err, true, -1); }); - disp_ec.stop(); - workers[0].stop_tcall(); }; worker_error_cb = [this](const std::exception_ptr err) { |