This commit is contained in:
Hao Kung 2015-06-25 19:27:06 -07:00
parent 3a8ea672ea
commit 1ae4c24a5f
1 changed files with 8 additions and 2 deletions

View File

@ -113,10 +113,16 @@ namespace Microsoft.AspNet.Authentication
/// </summary> /// </summary>
/// <returns>async completion</returns> /// <returns>async completion</returns>
internal async Task TeardownAsync() internal async Task TeardownAsync()
{
try
{ {
await FinishResponseOnce(); await FinishResponseOnce();
}
finally
{
UnregisterAuthenticationHandler(); UnregisterAuthenticationHandler();
} }
}
/// <summary> /// <summary>
/// Called once by common code after initialization. If an authentication middleware responds directly to /// Called once by common code after initialization. If an authentication middleware responds directly to