|
@@ -320,9 +320,9 @@ ssize_t DtlsTransport::ReadCallback(gnutls_transport_ptr_t ptr, void *data, size
|
|
int DtlsTransport::TimeoutCallback(gnutls_transport_ptr_t ptr, unsigned int ms) {
|
|
int DtlsTransport::TimeoutCallback(gnutls_transport_ptr_t ptr, unsigned int ms) {
|
|
DtlsTransport *t = static_cast<DtlsTransport *>(ptr);
|
|
DtlsTransport *t = static_cast<DtlsTransport *>(ptr);
|
|
try {
|
|
try {
|
|
- bool notEmpty = t->mIncomingQueue.wait(
|
|
|
|
|
|
+ bool isReadable = t->mIncomingQueue.wait(
|
|
ms != GNUTLS_INDEFINITE_TIMEOUT ? std::make_optional(milliseconds(ms)) : nullopt);
|
|
ms != GNUTLS_INDEFINITE_TIMEOUT ? std::make_optional(milliseconds(ms)) : nullopt);
|
|
- return notEmpty ? 1 : 0;
|
|
|
|
|
|
+ return isReadable ? 1 : 0;
|
|
|
|
|
|
} catch (const std::exception &e) {
|
|
} catch (const std::exception &e) {
|
|
PLOG_WARNING << e.what();
|
|
PLOG_WARNING << e.what();
|