From 38e0b84533dbfece4458d2143019d34a6b6281dd Mon Sep 17 00:00:00 2001 From: robs Date: Tue, 5 Mar 2002 18:18:47 +0000 Subject: [PATCH] don't linger when closing the connection to the server - force a TCP RST --- mod_fastcgi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mod_fastcgi.c b/mod_fastcgi.c index a8f8a2b..6139150 100644 --- a/mod_fastcgi.c +++ b/mod_fastcgi.c @@ -3,7 +3,7 @@ * * Apache server module for FastCGI. * - * $Id: mod_fastcgi.c,v 1.126 2002/03/04 22:31:01 robs Exp $ + * $Id: mod_fastcgi.c,v 1.127 2002/03/05 18:18:47 robs Exp $ * * Copyright (c) 1995-1996 Open Market, Inc. * @@ -848,6 +848,9 @@ static void close_connection_to_fs(fcgi_request *fr) } else { + /* abort the connection entirely */ + struct linger linger = {0, 0}; + setsockopt(fr->fd, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger)); closesocket(fr->fd); } @@ -858,7 +861,10 @@ static void close_connection_to_fs(fcgi_request *fr) if (fr->fd >= 0) { + struct linger linger = {0, 0}; set_nonblocking(fr, FALSE); + /* abort the connection entirely */ + setsockopt(fr->fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); closesocket(fr->fd); fr->fd = -1; } -- 2.11.4.GIT