public void OnSync(Int64 eventId) { if (Sync != null) { foreach (SyncHandler syncHandler in Sync.GetInvocationList()) { try { Sync(eventId); } catch (SocketException) { Sync -= syncHandler; } } } }