Skip to content

Fix: Add @unknown default to WebSocketEvent switch to ensure exhaustive handling #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

isandeepj
Copy link

Summary

This patch fixes a compiler error related to non-exhaustive switch statements in the WebSocket event handler (likely from Starscream used by PieSocket). It adds an @unknown default case to future-proof the switch and ensure stability with SDK updates.

Changes

  • Added @unknown default to WebSocketEvent switch block
  • Prevents build failures when the SDK introduces new enum cases
  • Keeps event handling logic safe and extensible

…Socket event cases

- Prevents compile-time error when the SDK adds new enum cases
- Improves forward compatibility with future PieSocket/Channels SDK updates
- Resolves "switch must be exhaustive" error in Channel.swift
Fix: Add @unknown default to WebSocketEvent switch to ensure exhaustive handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant