@@ -422,15 +422,17 @@ void WSLCSession::StartDockerd()
422422 m_dockerdProcess = launcher.Launch (*m_virtualMachine);
423423
424424 // Read stdout & stderr.
425- m_ioRelay.AddHandle (std::make_unique<windows::common::relay::LineBasedReadHandle>(
426- m_dockerdProcess->GetStdHandle (1 ), [&](const auto & data) { OnDockerdLog (data); }, false ));
425+ m_ioRelay.AddHandle (
426+ std::make_unique<windows::common::relay::LineBasedReadHandle>(
427+ m_dockerdProcess->GetStdHandle (1 ), [&](const auto & data) { OnDockerdLog (data); }, false ));
427428
428- m_ioRelay.AddHandle (std::make_unique<windows::common::relay::LineBasedReadHandle>(
429- m_dockerdProcess->GetStdHandle (2 ), [&](const auto & data) { OnDockerdLog (data); }, false ));
429+ m_ioRelay.AddHandle (
430+ std::make_unique<windows::common::relay::LineBasedReadHandle>(
431+ m_dockerdProcess->GetStdHandle (2 ), [&](const auto & data) { OnDockerdLog (data); }, false ));
430432
431433 // Monitor dockerd's exist so we can detect abnormal exits.
432- m_ioRelay.AddHandle (std::make_unique<windows::common::relay::EventHandle>(
433- m_dockerdProcess->GetExitEvent (), std::bind (&WSLCSession::OnDockerdExited, this )));
434+ m_ioRelay.AddHandle (
435+ std::make_unique<windows::common::relay::EventHandle>( m_dockerdProcess->GetExitEvent (), std::bind (&WSLCSession::OnDockerdExited, this )));
434436}
435437
436438void WSLCSession::StreamImageOperation (DockerHTTPClient::HTTPRequestContext& requestContext, LPCSTR Image, LPCSTR OperationName, IProgressCallback* ProgressCallback)
@@ -499,8 +501,9 @@ void WSLCSession::StreamImageOperation(DockerHTTPClient::HTTPRequestContext& req
499501
500502 auto onCompleted = [&]() { io.Cancel (); };
501503
502- io.AddHandle (std::make_unique<DockerHTTPClient::DockerHttpResponseHandle>(
503- requestContext, std::move (onHttpResponse), std::move (onChunk), std::move (onCompleted)));
504+ io.AddHandle (
505+ std::make_unique<DockerHTTPClient::DockerHttpResponseHandle>(
506+ requestContext, std::move (onHttpResponse), std::move (onChunk), std::move (onCompleted)));
504507
505508 io.Run ({});
506509
622625
623626 auto io = CreateIOContext ();
624627
625- io.AddHandle (std::make_unique<relay::RelayHandle<relay::ReadHandle>>(
626- buildFileHandle.Get (), common::relay::HandleWrapper{buildProcess.GetStdHandle (WSLCFDStdin)}));
628+ io.AddHandle (
629+ std::make_unique<relay::RelayHandle<relay::ReadHandle>>(
630+ buildFileHandle.Get (), common::relay::HandleWrapper{buildProcess.GetStdHandle (WSLCFDStdin)}));
627631
628632 bool verbose = Options->Verbose ;
629633 std::string allOutput;
@@ -912,8 +916,8 @@ void WSLCSession::ImportImageImpl(DockerHTTPClient::HTTPRequestContext& Request,
912916 }
913917 };
914918
915- io.AddHandle (std::make_unique<relay::RelayHandle<relay::ReadHandle>>(
916- userHandle.Get (), common::relay::HandleWrapper{Request.stream .native_handle ()}));
919+ io.AddHandle (
920+ std::make_unique<relay::RelayHandle<relay::ReadHandle>>( userHandle.Get (), common::relay::HandleWrapper{Request.stream .native_handle ()}));
917921
918922 io.AddHandle (
919923 std::make_unique<DockerHTTPClient::DockerHttpResponseHandle>(Request, std::move (onHttpResponse), std::move (onProgress)),
@@ -1385,15 +1389,16 @@ try
13851389 {
13861390 std::scoped_lock lock (m_containersLock, m_volumesLock);
13871391
1388- auto & it = m_containers.emplace_back (WSLCContainerImpl::Create (
1389- *containerOptions,
1390- *this ,
1391- m_virtualMachine.value (),
1392- m_volumes,
1393- std::bind (&WSLCSession::OnContainerDeleted, this , std::placeholders::_1),
1394- m_eventTracker.value (),
1395- m_dockerClient.value (),
1396- m_ioRelay));
1392+ auto & it = m_containers.emplace_back (
1393+ WSLCContainerImpl::Create (
1394+ *containerOptions,
1395+ *this ,
1396+ m_virtualMachine.value (),
1397+ m_volumes,
1398+ std::bind (&WSLCSession::OnContainerDeleted, this , std::placeholders::_1),
1399+ m_eventTracker.value (),
1400+ m_dockerClient.value (),
1401+ m_ioRelay));
13971402
13981403 it->CopyTo (Container);
13991404
@@ -1985,12 +1990,14 @@ MultiHandleWait WSLCSession::CreateIOContext(HANDLE CancelHandle)
19851990 relay::MultiHandleWait io;
19861991
19871992 // Cancel with E_ABORT if the session is terminating.
1988- io.AddHandle (std::make_unique<relay::EventHandle>(
1989- m_sessionTerminatingEvent.get (), [this ]() { THROW_HR_MSG (E_ABORT, " Session %lu is terminating" , m_id); }));
1993+ io.AddHandle (std::make_unique<relay::EventHandle>(m_sessionTerminatingEvent.get (), [this ]() {
1994+ THROW_HR_MSG (E_ABORT, " Session %lu is terminating" , m_id);
1995+ }));
19901996
19911997 // Cancel with E_ABORT if the client process exits.
1992- io.AddHandle (std::make_unique<relay::EventHandle>(
1993- wslutil::OpenCallingProcess (SYNCHRONIZE), [this ]() { THROW_HR_MSG (E_ABORT, " Client process has exited" ); }));
1998+ io.AddHandle (std::make_unique<relay::EventHandle>(wslutil::OpenCallingProcess (SYNCHRONIZE), [this ]() {
1999+ THROW_HR_MSG (E_ABORT, " Client process has exited" );
2000+ }));
19942001
19952002 if (CancelHandle != nullptr )
19962003 {
0 commit comments