mirror of
https://gitlab.com/sbrl/GalleryShare.git
synced 2018-06-12 22:45:16 +00:00
Bugfix: Prestore remote endpoint so avoid exception when logging errors.
This commit is contained in:
parent
b0b569dbf3
commit
d1343a472e
1 changed files with 2 additions and 1 deletions
|
@ -77,6 +77,7 @@ namespace GalleryShare
|
|||
/// <param name="cycle">The Http request to handle.</param>
|
||||
private async Task Handle(HttpListenerContext cycle)
|
||||
{
|
||||
IPEndPoint remoteEndpoint = cycle.Request.RemoteEndPoint;
|
||||
try
|
||||
{
|
||||
await router.RouteRequest(cycle);
|
||||
|
@ -86,7 +87,7 @@ namespace GalleryShare
|
|||
{
|
||||
Console.WriteLine("[{0}] [{1}] [Error] {2} ({3})",
|
||||
DateTime.Now.ToString("hh:m tt"),
|
||||
cycle.Request.RemoteEndPoint,
|
||||
remoteEndpoint,
|
||||
cycle.Request.RawUrl,
|
||||
error.Message
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue