Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NHttp/HttpServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ private void AcceptTcpClientCallback(IAsyncResult asyncResult)
{
try
{
BeginAcceptTcpClient(); // Do this first so as exception below doesn't interrupt listening

var listener = _listener; // Prevent race condition.

if (listener == null)
Expand All @@ -268,9 +270,7 @@ private void AcceptTcpClientCallback(IAsyncResult asyncResult)

RegisterClient(client);

client.BeginRequest();

BeginAcceptTcpClient();
client.BeginRequest();
}
catch (ObjectDisposedException)
{
Expand Down