internal void Recycle(HTTPConnectionRecycledDelegate onConnectionRecycled) { OnConnectionRecycled = onConnectionRecycled; if (!(State > HTTPConnectionStates.Initial && State < HTTPConnectionStates.WaitForProtocolShutdown) || State == HTTPConnectionStates.Redirected) { RecycleNow(); } }
protected void RecycleNow() { if (State == HTTPConnectionStates.TimedOut || State == HTTPConnectionStates.Closed) { LastProcessTime = DateTime.MinValue; } State = HTTPConnectionStates.Free; CurrentRequest = null; if (OnConnectionRecycled != null) { OnConnectionRecycled(this); OnConnectionRecycled = null; } }
protected void RecycleNow() { if (State == HTTPConnectionStates.TimedOut || State == HTTPConnectionStates.Closed) LastProcessTime = DateTime.MinValue; State = HTTPConnectionStates.Free; CurrentRequest = null; if (OnConnectionRecycled != null) { OnConnectionRecycled(this); OnConnectionRecycled = null; } }
internal void Recycle(HTTPConnectionRecycledDelegate onConnectionRecycled) { OnConnectionRecycled = onConnectionRecycled; if (!(State > HTTPConnectionStates.Initial && State < HTTPConnectionStates.WaitForProtocolShutdown) || State == HTTPConnectionStates.Redirected) RecycleNow(); }