You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Found a difference between this project and the Windows native HttpListener
It seems that request.RemoteEndPoint goes invalid after respose.outputStream.Close() or after response.Close()
On Windows with the native implementation you can still use RemoteEndPoint after the response close, eg for a Logging Message of "Response Sent back to " + request.RemoteEndPoint.ToString()
I think it's because closing the output returns the TCP connection to the pool. Probably just caching the properties on the type is the best solution and not too hard.
RogerHardiman
changed the title
request.RemoteEndPoint goes null when reqsponse.outputStream is closed - differs from Windows native HttpListener
request.RemoteEndPoint goes null when response.outputStream is closed - differs from Windows native HttpListener
Sep 24, 2024
Hi
Found a difference between this project and the Windows native HttpListener
It seems that request.RemoteEndPoint goes invalid after respose.outputStream.Close() or after response.Close()
On Windows with the native implementation you can still use RemoteEndPoint after the response close, eg for a Logging Message of "Response Sent back to " + request.RemoteEndPoint.ToString()
Here is a mini example.
It's not the end of the world. I can cache the value.
If you think it is an easy fix, I can fork, test and do a PR.
Thanks, Roger
The text was updated successfully, but these errors were encountered: