From aa5fdcf400433f1164f91c4f0a2e3ee8afc1cb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Tue, 26 Jan 2021 01:12:06 +0000 Subject: [PATCH] Fix 3272: 'POLLHUP' should always be check in 'read_from_net' to verify socket is still open --- lib/mysql_data_stream.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/mysql_data_stream.cpp b/lib/mysql_data_stream.cpp index d4ca691da0..69c3d6507f 100644 --- a/lib/mysql_data_stream.cpp +++ b/lib/mysql_data_stream.cpp @@ -432,6 +432,11 @@ int MySQL_Data_Stream::read_from_net() { //proxy_info("Entering\n"); } if ((revents & POLLIN)==0) return 0; + if (revents & POLLHUP) { + shut_soft(); + return -1; + } + int r=0; int s=queue_available(queueIN); if (encrypted) {