summaryrefslogtreecommitdiff
path: root/louloulibs/network/dns_socket_handler.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-03 21:12:16 +0200
committerlouiz’ <louiz@louiz.org>2016-10-03 21:12:16 +0200
commit45aebb8d8a3088058ae65b154496ce1fb2e3d94d (patch)
treedae462db64647b47960fdd339f973e98d4a646bc /louloulibs/network/dns_socket_handler.cpp
parentb29225601a475efe7f28fe7002eba72e70f3272b (diff)
downloadbiboumi-45aebb8d8a3088058ae65b154496ce1fb2e3d94d.tar.gz
biboumi-45aebb8d8a3088058ae65b154496ce1fb2e3d94d.tar.bz2
biboumi-45aebb8d8a3088058ae65b154496ce1fb2e3d94d.tar.xz
biboumi-45aebb8d8a3088058ae65b154496ce1fb2e3d94d.zip
Avoid an exception due to some bad logic in the DNS resolution mechanic
fix #3207
Diffstat (limited to 'louloulibs/network/dns_socket_handler.cpp')
-rw-r--r--louloulibs/network/dns_socket_handler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/louloulibs/network/dns_socket_handler.cpp b/louloulibs/network/dns_socket_handler.cpp
index 5fd08cb..403a5be 100644
--- a/louloulibs/network/dns_socket_handler.cpp
+++ b/louloulibs/network/dns_socket_handler.cpp
@@ -42,7 +42,8 @@ bool DNSSocketHandler::is_connected() const
void DNSSocketHandler::remove_from_poller()
{
- this->poller->remove_socket_handler(this->socket);
+ if (this->poller->is_managing_socket(this->socket))
+ this->poller->remove_socket_handler(this->socket);
}
#endif /* CARES_FOUND */