Skip to content

Remove crashing assertions#41

Open
DivineDominion wants to merge 2 commits intoadamnemecek:masterfrom
DivineDominion:remove-crashing-assertions
Open

Remove crashing assertions#41
DivineDominion wants to merge 2 commits intoadamnemecek:masterfrom
DivineDominion:remove-crashing-assertions

Conversation

@DivineDominion
Copy link
Contributor

Closes #40

internal final func remove(_ endpoint: MIDIEndpoint) -> Value? {
// disconnect?
guard let port = self[endpoint] else { assert(false); return nil }
assert(port.state == .connected)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamnemecek Since nothing bad happens when the state is not .connected, removing this wasn't a problem. But I think we could add an if port.state == connected path here if cleanup and disconnecting would be required.

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.

Remove assertion for disconnect

1 participant