Commit 1e98cb46 authored by Dominik Charousset's avatar Dominik Charousset

maintenance

parent 96b71cf4
......@@ -46,7 +46,6 @@
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
# include <fcntl.h>
#endif
namespace cppa { namespace detail {
......
......@@ -45,7 +45,6 @@
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
# include <fcntl.h>
#endif
namespace cppa { namespace detail {
......
......@@ -30,7 +30,6 @@
#include <cstdio>
#include <thread>
#include <fcntl.h>
#include <cstdint>
#include <cstring> // strerror
#include <unistd.h>
......@@ -44,6 +43,7 @@
#include "cppa/intrusive/single_reader_queue.hpp"
#include "cppa/detail/fd_util.hpp"
#include "cppa/detail/middleman.hpp"
#include "cppa/detail/network_manager.hpp"
......@@ -65,14 +65,7 @@ struct network_manager_impl : network_manager {
}
// store pipe read handle in local variables for lambda expression
int pipe_fd0 = pipe_fd[0];
// set read handle to nonblocking
auto flags = fcntl(pipe_fd0, F_GETFL, 0);
if (flags == -1) {
throw network_error("unable to read socket flags");
}
if (fcntl(pipe_fd0, F_SETFL, flags | O_NONBLOCK) < 0) {
CPPA_CRITICAL("unable to set pipe read handle to nonblock");
}
fd_util::nonblocking(pipe_fd0, true);
// start threads
m_middleman_thread = std::thread([this, pipe_fd0] {
middleman_loop(pipe_fd0, this->m_middleman_queue);
......
......@@ -37,7 +37,6 @@
#include <iostream>
#include <stdexcept>
#include <fcntl.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp"
......
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