/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
/* prevent those nasty RST packets */
char buf[SQUID_TCP_SO_RCVBUF];
- if (fd_table[fd].flags.nonblocking) {
+ if (fd_table[fd].flags.nonblocking && fd_table[fd].type != FD_MSGHDR) {
while (FD_READ_METHOD(fd, buf, SQUID_TCP_SO_RCVBUF) > 0) {};
}
#endif
comm_close_complete(const FdeCbParams ¶ms)
{
fde *F = &fd_table[params.fd];
- F->ssl.reset(nullptr);
-
-#if USE_OPENSSL
- if (F->dynamicSslContext) {
- SSL_CTX_free(F->dynamicSslContext);
- F->dynamicSslContext = NULL;
- }
-#endif
+ F->ssl.reset();
+ F->dynamicTlsContext.reset();
fd_close(params.fd); /* update fdstat */
close(params.fd);
// amount of time. We must re-validate that it is active and usable.
// If the connection has been closed already. Cancel this read.
- if (!Comm::IsConnOpen(read.theRead.conn)) {
+ if (!fd_table || !Comm::IsConnOpen(read.theRead.conn)) {
if (read.closer != NULL) {
read.closer->cancel("Connection closed before.");
read.closer = NULL;