diff options
author | Amirsaman Memaripour <amirsaman.memaripour@mongodb.com> | 2020-07-22 19:45:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-22 22:53:47 +0000 |
commit | a3ed860ba4fbb9a662440c8e9608fef5fa6c8712 (patch) | |
tree | 3e7895d2d6c50f50f41c5038ff784dfe98e14286 /src/mongo/transport/session_asio.h | |
parent | 01636425695d37e1c3090ff8b47a97d87a4eb1f6 (diff) | |
download | mongo-a3ed860ba4fbb9a662440c8e9608fef5fa6c8712.tar.gz |
SERVER-49106 Add poll function to the ServiceExecutor API
Diffstat (limited to 'src/mongo/transport/session_asio.h')
-rw-r--r-- | src/mongo/transport/session_asio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/transport/session_asio.h b/src/mongo/transport/session_asio.h index e2590153b9f..59778b57315 100644 --- a/src/mongo/transport/session_asio.h +++ b/src/mongo/transport/session_asio.h @@ -167,6 +167,14 @@ public: return sourceMessageImpl(baton); } + Future<void> waitForData() override { +#ifdef MONGO_CONFIG_SSL + if (_sslSocket) + return asio::async_read(*_sslSocket, asio::null_buffers(), UseFuture{}).ignoreValue(); +#endif + return asio::async_read(_socket, asio::null_buffers(), UseFuture{}).ignoreValue(); + } + Status sinkMessage(Message message) override { ensureSync(); |