diff -Nuar boost_1_49_0-1.53/boost/asio/detail/epoll_reactor.hpp boost_1_49_0/boost/asio/detail/epoll_reactor.hpp
|
old
|
new
|
|
| 62 | 62 | int descriptor_; |
| 63 | 63 | boost::uint32_t registered_events_; |
| 64 | 64 | op_queue<reactor_op> op_queue_[max_ops]; |
| | 65 | bool connected_; |
| 65 | 66 | bool shutdown_; |
| 66 | 67 | |
| 67 | 68 | BOOST_ASIO_DECL descriptor_state(); |
diff -Nuar boost_1_49_0-1.53/boost/asio/detail/impl/epoll_reactor.ipp boost_1_49_0/boost/asio/detail/impl/epoll_reactor.ipp
|
old
|
new
|
|
| 155 | 155 | |
| 156 | 156 | descriptor_data->reactor_ = this; |
| 157 | 157 | descriptor_data->descriptor_ = descriptor; |
| | 158 | descriptor_data->connected_ = false; |
| 158 | 159 | descriptor_data->shutdown_ = false; |
| 159 | 160 | } |
| 160 | 161 | |
| … |
… |
|
| 180 | 181 | |
| 181 | 182 | descriptor_data->reactor_ = this; |
| 182 | 183 | descriptor_data->descriptor_ = descriptor; |
| | 184 | descriptor_data->connected_ = false; |
| 183 | 185 | descriptor_data->shutdown_ = false; |
| 184 | 186 | descriptor_data->op_queue_[op_type].push(op); |
| 185 | 187 | } |
| … |
… |
|
| 615 | 617 | static const int flag[max_ops] = { EPOLLIN, EPOLLOUT, EPOLLPRI }; |
| 616 | 618 | for (int j = max_ops - 1; j >= 0; --j) |
| 617 | 619 | { |
| 618 | | if (events & (flag[j] | EPOLLERR | EPOLLHUP)) |
| | 620 | if (events & (flag[j] | EPOLLERR | (connected_ ? EPOLLHUP : 0))) |
| 619 | 621 | { |
| 620 | 622 | while (reactor_op* op = op_queue_[j].front()) |
| 621 | 623 | { |
| | 624 | if (j == connect_op) |
| | 625 | connected_ = true; |
| | 626 | |
| 622 | 627 | if (op->perform()) |
| 623 | 628 | { |
| 624 | 629 | op_queue_[j].pop(); |