Skip to content
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

Notify the delegate of events after updating our internal state #2

Merged
merged 1 commit into from
Dec 6, 2013

Conversation

packagethief
Copy link
Contributor

Updates the open and close methods to notify the delegate last, after they've updated the current state.

Should the delegate decide to inspect the given EventSource, its state should be consistent. Otherwise, the following assertion would fail:

- (void)eventSourceDidClose:(TRVSEventSource *)eventSource {
    NSAssert(eventSource.isClosed, @"Event source should be closed");
}

Should the delegate decide to inspect the given EventSource, its state should
be consistent. Otherwise, the following assertion would fail:

- (void)eventSourceDidClose:(TRVSEventSource *)eventSource {
    NSAssert(eventSource.isClosed, @"Event source should be closed");
}
travisjeffery pushed a commit that referenced this pull request Dec 6, 2013
Notify the delegate of events after updating our internal state
@travisjeffery travisjeffery merged commit ee4f20e into master Dec 6, 2013
@packagethief packagethief deleted the notify-delegate-last branch December 6, 2013 16:38
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.

2 participants