Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit dc34407

Browse files
committed
fix
1 parent 7980a5a commit dc34407

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,18 @@ await HeaderParser.ReadHeaders(clientStream, args.HttpClient.Request.Headers,
159159
}
160160

161161
prefetchTask = null;
162+
}
162163

164+
if (connection != null)
165+
{
166+
var socket = connection.TcpSocket;
167+
bool part1 = socket.Poll(1000, SelectMode.SelectRead);
168+
bool part2 = socket.Available == 0;
169+
if (part1 & part2)
170+
{
171+
//connection is closed
172+
connection = null;
173+
}
163174
}
164175

165176
// create a new connection if cache key changes.

0 commit comments

Comments
 (0)