MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / DisposeAsync

Method DisposeAsync

dotnet/src/webdriver/BiDi/EventStream.cs:80–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 }
79
80 public async ValueTask DisposeAsync()
81 {
82 if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0)
83 {
84 try
85 {
86 await _unsubscribe(default).ConfigureAwait(false);
87 }
88 catch (Exception ex)
89 {
90 _logger.Warn($"Wire unsubscribe failed during dispose: {ex.Message}");
91 throw;
92 }
93 finally
94 {
95 _channel.Writer.TryComplete();
96 }
97 }
98 }
99}

Callers

nothing calls this directly

Calls 1

WarnMethod · 0.45

Tested by

no test coverage detected