File tree Expand file tree Collapse file tree 9 files changed +18
-9
lines changed
examples/Demo/Shared/Components Expand file tree Collapse file tree 9 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ async ValueTask IAsyncDisposable.DisposeAsync()
204204 await _jsModule . DisposeAsync ( ) ;
205205 }
206206 }
207- catch ( JSDisconnectedException )
207+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
208+ ex is OperationCanceledException )
208209 {
209210 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
210211 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -151,7 +151,8 @@ public async ValueTask DisposeAsync()
151151 await _jsModule . DisposeAsync ( ) ;
152152 }
153153 }
154- catch ( JSDisconnectedException )
154+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
155+ ex is OperationCanceledException )
155156 {
156157 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
157158 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -516,7 +516,8 @@ public async ValueTask DisposeAsync()
516516 await Module . DisposeAsync ( ) ;
517517 }
518518 }
519- catch ( JSDisconnectedException )
519+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
520+ ex is OperationCanceledException )
520521 {
521522 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
522523 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ public async ValueTask DisposeAsync()
4949 await _jsModule . DisposeAsync ( ) ;
5050 }
5151 }
52- catch ( JSDisconnectedException )
52+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
53+ ex is OperationCanceledException )
5354 {
5455 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
5556 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ public async ValueTask DisposeAsync()
8484 await _jsModule . DisposeAsync ( ) ;
8585 }
8686 }
87- catch ( JSDisconnectedException )
87+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
88+ ex is OperationCanceledException )
8889 {
8990 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
9091 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -595,7 +595,8 @@ public async ValueTask DisposeAsync()
595595 await Module . DisposeAsync ( ) ;
596596 }
597597 }
598- catch ( JSDisconnectedException )
598+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
599+ ex is OperationCanceledException )
599600 {
600601 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
601602 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ public async ValueTask DisposeAsync()
144144 await _jsModule . DisposeAsync ( ) ;
145145 }
146146 }
147- catch ( JSDisconnectedException )
147+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
148+ ex is OperationCanceledException )
148149 {
149150 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
150151 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ public async ValueTask DisposeAsync()
145145 }
146146
147147 }
148- catch ( JSDisconnectedException )
148+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
149+ ex is OperationCanceledException )
149150 {
150151 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
151152 // the client disconnected. This is not an error.
Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ protected virtual async ValueTask DisposeCoreAsync()
7979 {
8080 // This can be called too early when using prerendering
8181 }
82- catch ( JSDisconnectedException )
82+ catch ( Exception ex ) when ( ex is JSDisconnectedException ||
83+ ex is OperationCanceledException )
8384 {
8485 // The JSRuntime side may routinely be gone already if the reason we're disposing is that
8586 // the client disconnected. This is not an error.
You can’t perform that action at this time.
0 commit comments