@@ -199,7 +199,7 @@ class EventLoop
199199 LoggingErrorHandler m_error_handler{*this };
200200
201201 // ! Capnp list of pending promises.
202- boost::optional< kj::TaskSet> m_task_set;
202+ kj::TaskSet m_task_set;
203203
204204 // ! List of connections.
205205 std::list<Connection> m_incoming_connections;
@@ -310,7 +310,7 @@ class Connection
310310 // to the EventLoop TaskSet to avoid "Promise callback destroyed itself"
311311 // error in cases where f deletes this Connection object.
312312 m_on_disconnect.add (m_network.onDisconnect ().then (
313- kj::mvCapture (f, [this ](F&& f) { m_loop.m_task_set -> add (kj::evalLater (kj::mv (f))); })));
313+ kj::mvCapture (f, [this ](F&& f) { m_loop.m_task_set . add (kj::evalLater (kj::mv (f))); })));
314314 }
315315
316316 EventLoop& m_loop;
@@ -525,7 +525,7 @@ template <typename InitInterface, typename InitImpl>
525525void _Listen (EventLoop& loop, kj::Own<kj::ConnectionReceiver>&& listener, InitImpl& init)
526526{
527527 auto * ptr = listener.get ();
528- loop.m_task_set -> add (ptr->accept ().then (kj::mvCapture (kj::mv (listener),
528+ loop.m_task_set . add (ptr->accept ().then (kj::mvCapture (kj::mv (listener),
529529 [&loop, &init](kj::Own<kj::ConnectionReceiver>&& listener, kj::Own<kj::AsyncIoStream>&& stream) {
530530 _Serve<InitInterface>(loop, kj::mv (stream), init);
531531 _Listen<InitInterface>(loop, kj::mv (listener), init);
0 commit comments