Skip to content

Commit 67b4997

Browse files
committed
Rename
1 parent 6975a7f commit 67b4997

31 files changed

+383
-343
lines changed

src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ protected override void OnRequestProcessingEnded()
9999
void IRequestProcessor.OnInputOrOutputCompleted()
100100
{
101101
// Closed gracefully.
102-
_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!, ConnectionErrorReason.NoError);
102+
_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!, ConnectionEndReason.NoError);
103103
CancelRequestAbortedToken();
104104
}
105105

106106
void IHttpOutputAborter.OnInputOrOutputCompleted()
107107
{
108-
_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), ConnectionErrorReason.InputOrOutputCompleted);
108+
_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), ConnectionEndReason.InputOrOutputCompleted);
109109
CancelRequestAbortedToken();
110110
}
111111

112112
/// <summary>
113113
/// Immediately kill the connection and poison the request body stream with an error.
114114
/// </summary>
115-
public void Abort(ConnectionAbortedException abortReason, ConnectionErrorReason reason)
115+
public void Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
116116
{
117117
_http1Output.Abort(abortReason, reason);
118118
CancelRequestAbortedToken();
@@ -122,15 +122,15 @@ public void Abort(ConnectionAbortedException abortReason, ConnectionErrorReason
122122
protected override void ApplicationAbort()
123123
{
124124
Log.ApplicationAbortedConnection(ConnectionId, TraceIdentifier);
125-
Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), ConnectionErrorReason.AbortedByApplication);
125+
Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), ConnectionEndReason.AbortedByApplication);
126126
}
127127

128128
/// <summary>
129129
/// Stops the request processing loop between requests.
130130
/// Called on all active connections when the server wants to initiate a shutdown
131131
/// and after a keep-alive timeout.
132132
/// </summary>
133-
public void StopProcessingNextRequest(ConnectionErrorReason errorReason)
133+
public void StopProcessingNextRequest(ConnectionEndReason errorReason)
134134
{
135135
_keepAlive = false;
136136
Input.CancelPendingRead();

src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected override Task OnConsumeAsync()
7272
_context.ReportApplicationError(connectionAbortedException);
7373

7474
// Have to abort the connection because we can't finish draining the request
75-
_context.StopProcessingNextRequest(ConnectionErrorReason.AbortedByApplication);
75+
_context.StopProcessingNextRequest(ConnectionEndReason.AbortedByApplication);
7676
return Task.CompletedTask;
7777
}
7878

@@ -108,7 +108,7 @@ protected async Task OnConsumeAsyncAwaited()
108108
_context.ReportApplicationError(connectionAbortedException);
109109

110110
// Have to abort the connection because we can't finish draining the request
111-
_context.StopProcessingNextRequest(ConnectionErrorReason.AbortedByApplication);
111+
_context.StopProcessingNextRequest(ConnectionEndReason.AbortedByApplication);
112112
}
113113
finally
114114
{

src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ private void CompletePipe()
449449
}
450450
}
451451

452-
public void Abort(ConnectionAbortedException error, ConnectionErrorReason errorReason)
452+
public void Abort(ConnectionAbortedException error, ConnectionEndReason errorReason)
453453
{
454454
// Abort can be called after Dispose if there's a flush timeout.
455455
// It's important to still call _lifetimeFeature.Abort() in this case.
@@ -460,9 +460,9 @@ public void Abort(ConnectionAbortedException error, ConnectionErrorReason errorR
460460
return;
461461
}
462462

463-
if (errorReason != ConnectionErrorReason.NoError && _metricsTagsFeature != null)
463+
if (errorReason != ConnectionEndReason.NoError && _metricsTagsFeature != null)
464464
{
465-
_metricsTagsFeature.TryAddTag("kestrel.connection.error_reason", errorReason.ToString());
465+
_metricsTagsFeature.TryAddTag(KestrelMetrics.KestrelConnectionEndReason, errorReason.ToString());
466466
}
467467

468468
_aborted = true;

src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputAborter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
77

88
internal interface IHttpOutputAborter
99
{
10-
void Abort(ConnectionAbortedException abortReason, ConnectionErrorReason errorReason);
10+
void Abort(ConnectionAbortedException abortReason, ConnectionEndReason errorReason);
1111
void OnInputOrOutputCompleted();
1212
}

src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public bool TryAdvance(int bytes)
4141
// flow-control window at the time of the abort.
4242
if (bytes > _flow.Available)
4343
{
44-
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorFlowControlWindowExceeded, Http2ErrorCode.FLOW_CONTROL_ERROR, ConnectionErrorReason.FlowControlWindowExceeded);
44+
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorFlowControlWindowExceeded, Http2ErrorCode.FLOW_CONTROL_ERROR, ConnectionEndReason.FlowControlWindowExceeded);
4545
}
4646

4747
if (_flow.IsAborted)

0 commit comments

Comments
 (0)