public async void Announce(InfoHash infoHash, int port) { CheckDisposed(); Check.InfoHash(infoHash); try { await MainLoop; var task = new AnnounceTask(this, infoHash, port); await task.ExecuteAsync(); } catch { // Ignore? } }
public async void Announce(InfoHash infoHash, int port) { CheckDisposed(); if (infoHash is null) { throw new ArgumentNullException(nameof(infoHash)); } try { await MainLoop; var task = new AnnounceTask(this, infoHash, port); await task.ExecuteAsync(); } catch { // Ignore? } }