Removed modest optimization and added errorCallback call in fail case for server sent events.