NotifyOnCompleted does not catch exceptions, may abort the response/connection
#5.885 geöffnet am 7. März 2018
Repository-Metriken
- Stars
- (37.933 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 16T 9h) (258 gemergte PRs in 30 T)
Beschreibung
NotifyOnCompleted should catch and log its own exceptions as to not disrupt the normal request flow. It doesn't.
https://github.com/aspnet/HttpSysServer/blob/336e85d19abcdf3ec3a024cb9431c768a4e5d494/src/Microsoft.AspNetCore.Server.HttpSys/MessagePump.cs#L204-L214 https://github.com/aspnet/HttpSysServer/blob/336e85d19abcdf3ec3a024cb9431c768a4e5d494/src/Microsoft.AspNetCore.Server.HttpSys/FeatureContext.cs#L586-L591
It also fires before the response is flushed/disposed so these exceptions may abort the response/connection. Compare to https://github.com/aspnet/KestrelHttpServer/pull/2324