Skip to content

Commit e5a076c

Browse files
committed
Remove remote pause code
1 parent 23adb73 commit e5a076c

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

src/Components/Server/src/Circuits/Circuit.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,4 @@ internal Circuit(CircuitHost circuitHost)
1919
/// Gets the identifier for the <see cref="Circuit"/>.
2020
/// </summary>
2121
public string Id => _circuitHost.CircuitId.Id;
22-
23-
/// <summary>
24-
/// Notifies the client that the circuit must be paused and lets
25-
/// the client start the pause process.
26-
/// </summary>
27-
/// <remarks>
28-
/// <para>
29-
/// Graceful pauses always start client-side. This method only notifies
30-
/// the client that it should start the pause process, but it does not
31-
/// start the actual pause operation.
32-
/// </para>
33-
/// <para>
34-
/// If the notification fails due to a disconnection, the circuit continues
35-
/// operating normally, transitioning to a disconnected state and eventually
36-
/// performing an ungraceful pause if the client does not reconnect.
37-
/// </para>
38-
/// </remarks>
39-
public void PauseCircuit()
40-
{
41-
_circuitHost.TriggerCircuitPause();
42-
}
4322
}

src/Components/Server/src/Circuits/CircuitHost.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -912,23 +912,6 @@ internal async Task<bool> SendPersistedStateToClient(string rootComponents, stri
912912
}
913913
}
914914

915-
internal void TriggerCircuitPause()
916-
{
917-
_ = InvokeCircuitPauseFromServer();
918-
}
919-
920-
private async Task InvokeCircuitPauseFromServer()
921-
{
922-
try
923-
{
924-
await Client.SendAsync("JS.RemotePause");
925-
}
926-
catch (Exception ex)
927-
{
928-
Log.FailedToTriggerRemoteCircuitPause(_logger, CircuitId, ex);
929-
}
930-
}
931-
932915
private static partial class Log
933916
{
934917
// 100s used for lifecycle stuff
@@ -976,9 +959,6 @@ private static partial class Log
976959
[LoggerMessage(113, LogLevel.Debug, "Update root components failed.", EventName = nameof(UpdateRootComponentsFailed))]
977960
public static partial void UpdateRootComponentsFailed(ILogger logger, Exception exception);
978961

979-
[LoggerMessage(114, LogLevel.Error, "Failed to trigger remote circuit pause in circuit '{CircuitId}'.", EventName = "FailedToTriggerRemoteCircuitPause")]
980-
public static partial void FailedToTriggerRemoteCircuitPause(ILogger logger, CircuitId circuitId, Exception exception);
981-
982962
public static void CircuitHandlerFailed(ILogger logger, CircuitHandler handler, string handlerMethod, Exception exception)
983963
{
984964
CircuitHandlerFailed(

src/Components/Server/src/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ Microsoft.AspNetCore.Components.Server.CircuitOptions.PersistedCircuitInMemoryMa
33
Microsoft.AspNetCore.Components.Server.CircuitOptions.PersistedCircuitInMemoryMaxRetained.set -> void
44
Microsoft.AspNetCore.Components.Server.CircuitOptions.PersistedCircuitInMemoryRetentionPeriod.get -> System.TimeSpan
55
Microsoft.AspNetCore.Components.Server.CircuitOptions.PersistedCircuitInMemoryRetentionPeriod.set -> void
6-
Microsoft.AspNetCore.Components.Server.Circuits.Circuit.PauseCircuit() -> void

src/Components/Web.JS/src/Platform/Circuits/CircuitManager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ export class CircuitManager implements DotNet.DotNetCallDispatcher {
165165
this._dispatcher.supplyDotNetStream(streamId, readableStream);
166166
});
167167

168-
connection.on('JS.RemotePause', () => {
169-
this.pause(true);
170-
});
171-
172168
connection.on('JS.RenderBatch', async (batchId: number, batchData: Uint8Array) => {
173169
this._logger.log(LogLevel.Debug, `Received render batch with id ${batchId} and ${batchData.byteLength} bytes.`);
174170
await this._renderQueue.processBatch(batchId, batchData, this._connection!);

0 commit comments

Comments
 (0)