Commit de8d70bc authored by justcoding121's avatar justcoding121

move exception location

parent 987afc96
...@@ -223,6 +223,11 @@ namespace Titanium.Web.Proxy ...@@ -223,6 +223,11 @@ namespace Titanium.Web.Proxy
{ {
return; return;
} }
if (args.TerminateSession)
{
throw new Exception("Session was terminated by user.");
}
} }
catch (Exception e) when (!(e is ProxyHttpException)) catch (Exception e) when (!(e is ProxyHttpException))
{ {
...@@ -236,11 +241,6 @@ namespace Titanium.Web.Proxy ...@@ -236,11 +241,6 @@ namespace Titanium.Web.Proxy
} }
finally finally
{ {
if (args.TerminateSession)
{
throw new Exception("Session was terminated by user.");
}
await InvokeAfterResponse(args); await InvokeAfterResponse(args);
args.Dispose(); args.Dispose();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment