From b41a5a1b12c56bb730392d18ba2da8042e4dcd41 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 21 Nov 2014 02:07:05 -0800 Subject: [PATCH] Bug 4146: workaround SSL Bump crash on Linux --- src/comm.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/comm.cc b/src/comm.cc index 659cd27c32..7800f6fbbe 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -102,9 +102,14 @@ static void comm_empty_os_read_buffers(int fd) { #if _SQUID_LINUX_ +#if USE_OPENSSL + // Bug 4146: SSL-Bump BIO does not release sockets on close. + if (fd_table[fd].ssl) + return; +#endif + /* prevent those nasty RST packets */ char buf[SQUID_TCP_SO_RCVBUF]; - if (fd_table[fd].flags.nonblocking) { while (FD_READ_METHOD(fd, buf, SQUID_TCP_SO_RCVBUF) > 0) {}; } -- 2.47.2