Commit f3c22869 authored by Marian Triebe's avatar Marian Triebe

Fix error propagation of publish and connect

closes #672
parent af6ef2a0
...@@ -214,7 +214,7 @@ protected: ...@@ -214,7 +214,7 @@ protected:
uint16_t port) override { uint16_t port) override {
CAF_LOG_TRACE(CAF_ARG(host) << CAF_ARG(port)); CAF_LOG_TRACE(CAF_ARG(host) << CAF_ARG(port));
auto fd = io::network::new_tcp_connection(host, port); auto fd = io::network::new_tcp_connection(host, port);
if (fd == io::network::invalid_native_socket) if (!fd)
return std::move(fd.error()); return std::move(fd.error());
io::network::nonblocking(*fd, true); io::network::nonblocking(*fd, true);
auto sssn = make_session(system(), *fd, false); auto sssn = make_session(system(), *fd, false);
...@@ -231,7 +231,7 @@ protected: ...@@ -231,7 +231,7 @@ protected:
bool reuse) override { bool reuse) override {
CAF_LOG_TRACE(CAF_ARG(port) << CAF_ARG(reuse)); CAF_LOG_TRACE(CAF_ARG(port) << CAF_ARG(reuse));
auto fd = io::network::new_tcp_acceptor_impl(port, addr, reuse); auto fd = io::network::new_tcp_acceptor_impl(port, addr, reuse);
if (fd == io::network::invalid_native_socket) if (!fd)
return std::move(fd.error()); return std::move(fd.error());
return make_counted<doorman_impl>(mpx(), *fd); return make_counted<doorman_impl>(mpx(), *fd);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment