diff options
Diffstat (limited to 'sql/semisync_master_ack_receiver.h')
-rw-r--r-- | sql/semisync_master_ack_receiver.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/semisync_master_ack_receiver.h b/sql/semisync_master_ack_receiver.h index eacb4b20..6b3ff369 100644 --- a/sql/semisync_master_ack_receiver.h +++ b/sql/semisync_master_ack_receiver.h @@ -186,7 +186,7 @@ public: char buff[100]; /* Clear the signal message */ #ifndef _WIN32 - read(local_read_signal, buff, sizeof(buff)); + (void) !read(local_read_signal, buff, sizeof(buff)); #else recv(local_read_signal, buff, sizeof(buff), 0); #endif /* _WIN32 */ @@ -228,6 +228,11 @@ public: return m_fds[slave->m_fds_index].revents & POLLIN; } + bool is_socket_hangup(const Slave *slave) + { + return m_fds[slave->m_fds_index].revents & POLLHUP; + } + void clear_socket_info(const Slave *slave) { m_fds[slave->m_fds_index].fd= -1; @@ -296,6 +301,11 @@ public: return FD_ISSET(slave->sock_fd(), &m_fds); } + bool is_socket_hangup(const Slave *slave) + { + return 0; + } + bool has_signal_data() override { return FD_ISSET(local_read_signal, &m_fds); |