daemon: use asio::defer() instead of asio::post() where appropriate
Change-Id: I24d0fab6499d6430dd500ca157daa87f48960d15
diff --git a/tests/daemon/face/udp-channel-fixture.hpp b/tests/daemon/face/udp-channel-fixture.hpp
index a314a8c..63caf9a 100644
--- a/tests/daemon/face/udp-channel-fixture.hpp
+++ b/tests/daemon/face/udp-channel-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
#include "channel-fixture.hpp"
+#include <boost/asio/defer.hpp>
+
namespace nfd::tests {
using face::UdpChannel;
@@ -52,7 +54,7 @@
void
connect(UdpChannel& channel) final
{
- g_io.post([&] {
+ boost::asio::defer(g_io, [&] {
channel.connect(listenerEp, {},
[this] (const shared_ptr<Face>& newFace) {
BOOST_REQUIRE(newFace != nullptr);