Commit 72470e9b authored by knowledge4igor's avatar knowledge4igor

Change return value in Listener::bind method to void: using bool is obsolete

parent 09cd379b
......@@ -67,10 +67,9 @@ private:
throw std::runtime_error("Must call setHandler() prior to serve()");
listener.setHandler(handler_);
listener.bind();
if (listener.bind()) {
CALL_MEMBER_FN(listener, method)();
}
CALL_MEMBER_FN(listener, method)();
#undef CALL_MEMBER_FN
}
......
......@@ -49,8 +49,8 @@ public:
int backlog = Const::MaxBacklog);
void setHandler(const std::shared_ptr<Handler>& handler);
bool bind();
bool bind(const Address& adress);
void bind();
void bind(const Address& adress);
bool isBound() const;
......
......@@ -150,12 +150,12 @@ Listener::pinWorker(size_t worker, const CpuSet& set)
#endif
}
bool
void
Listener::bind() {
return bind(addr_);
bind(addr_);
}
bool
void
Listener::bind(const Address& address) {
if (!handler_)
throw std::runtime_error("Call setHandler before calling bind()");
......@@ -205,8 +205,6 @@ Listener::bind(const Address& address) {
reactor_.init(Aio::AsyncContext(workers_));
transportKey = reactor_.addHandler(transport_);
return true;
}
bool
......
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