travisjeffery/TRVSEventSource — pull request #2 by packagethief (2013-12-06 16:18:41+00:00)
Title: Notify the delegate of events after updating our internal state

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:

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