Fixed some crashes

This commit is contained in:
WolverinDEV
2020-02-18 11:53:33 +01:00
parent 6479e31435
commit 0fccd957b6
3 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -15,7 +15,9 @@ void LicenceRequest::handlePacketDisconnect(const std::string& message) {
* Test if we have a result. If so and the license is invalid then we could use that result
*/
if(this->response && !this->response->license_valid) {
this->currentFuture->executionSucceed(this->response);
try {
this->currentFuture->executionSucceed(this->response);
} catch(threads::InvalidFutureException& ex) {}
} else {
LICENSE_FERR(this, UnexcpectedDisconnectException, "Remote side closed the connection unexpectedly (" + message + ")");
}
@@ -119,7 +121,9 @@ void LicenceRequest::handlePacketInfoAdjustment(const std::string& message) {
this->callback_update_certificate(cert);
}
this->currentFuture->executionSucceed(this->response);
try {
this->currentFuture->executionSucceed(this->response);
} catch(threads::InvalidFutureException& ex) {}
this->response = nullptr;
this->disconnect("query succeeded!");