Commit b332a1ad authored by Dominik Charousset's avatar Dominik Charousset Committed by Dominik Charousset

Consolidate io_failure implementations

parent f182d377
...@@ -72,8 +72,6 @@ public: ...@@ -72,8 +72,6 @@ public:
virtual void remove_endpoint(datagram_handle hdl) = 0; virtual void remove_endpoint(datagram_handle hdl) = 0;
void io_failure(execution_unit* ctx, network::operation op) override;
bool consume(execution_unit*, datagram_handle hdl, bool consume(execution_unit*, datagram_handle hdl,
network::receive_buffer& buf) override; network::receive_buffer& buf) override;
......
...@@ -43,8 +43,6 @@ public: ...@@ -43,8 +43,6 @@ public:
~doorman() override; ~doorman() override;
void io_failure(execution_unit* ctx, network::operation op) override;
using doorman_base::new_connection; using doorman_base::new_connection;
bool new_connection(execution_unit* ctx, connection_handle x); bool new_connection(execution_unit* ctx, connection_handle x);
......
...@@ -63,8 +63,8 @@ public: ...@@ -63,8 +63,8 @@ public:
/// Adds the I/O device to the event loop of the middleman. /// Adds the I/O device to the event loop of the middleman.
virtual void add_to_loop() = 0; virtual void add_to_loop() = 0;
/// Called by the underlying I/O device to report failures. /// Detaches this manager from its parent in case of an error.
virtual void io_failure(execution_unit* ctx, operation op) = 0; void io_failure(execution_unit* ctx, operation op);
/// Get the address of the underlying I/O device. /// Get the address of the underlying I/O device.
virtual std::string addr() const = 0; virtual std::string addr() const = 0;
......
...@@ -57,8 +57,6 @@ public: ...@@ -57,8 +57,6 @@ public:
/// content of the buffer via the network. /// content of the buffer via the network.
virtual void flush() = 0; virtual void flush() = 0;
void io_failure(execution_unit* ctx, network::operation op) override;
bool consume(execution_unit*, const void*, size_t) override; bool consume(execution_unit*, const void*, size_t) override;
void data_transferred(execution_unit*, size_t, size_t) override; void data_transferred(execution_unit*, size_t, size_t) override;
......
...@@ -73,13 +73,6 @@ void datagram_servant::datagram_sent(execution_unit* ctx, datagram_handle hdl, ...@@ -73,13 +73,6 @@ void datagram_servant::datagram_sent(execution_unit* ctx, datagram_handle hdl,
invoke_mailbox_element_impl(ctx, tmp); invoke_mailbox_element_impl(ctx, tmp);
} }
void datagram_servant::io_failure(execution_unit* ctx, network::operation op) {
CAF_LOG_TRACE(CAF_ARG(hdl()) << CAF_ARG(op));
// keep compiler happy when compiling w/o logging
static_cast<void>(op);
detach(ctx, true);
}
} // namespace io } // namespace io
} // namespace caf } // namespace caf
...@@ -37,13 +37,6 @@ message doorman::detach_message() { ...@@ -37,13 +37,6 @@ message doorman::detach_message() {
return make_message(acceptor_closed_msg{hdl()}); return make_message(acceptor_closed_msg{hdl()});
} }
void doorman::io_failure(execution_unit* ctx, network::operation op) {
CAF_LOG_TRACE(CAF_ARG(hdl().id()) << CAF_ARG(op));
// keep compiler happy when compiling w/o logging
static_cast<void>(op);
detach(ctx, true);
}
bool doorman::new_connection(execution_unit* ctx, connection_handle x) { bool doorman::new_connection(execution_unit* ctx, connection_handle x) {
msg().handle = x; msg().handle = x;
return invoke_mailbox_element(ctx); return invoke_mailbox_element(ctx);
......
...@@ -77,12 +77,5 @@ void scribe::data_transferred(execution_unit* ctx, size_t written, ...@@ -77,12 +77,5 @@ void scribe::data_transferred(execution_unit* ctx, size_t written,
//parent()->consume(std::move(ptr)); //parent()->consume(std::move(ptr));
} }
void scribe::io_failure(execution_unit* ctx, network::operation op) {
CAF_LOG_TRACE(CAF_ARG(hdl()) << CAF_ARG(op));
// keep compiler happy when compiling w/o logging
static_cast<void>(op);
detach(ctx, true);
}
} // namespace io } // namespace io
} // namespace caf } // namespace caf
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