alexcrichton/AudioStreamer — pull request #17 by Bo98 (2012-09-07 14:38:45+00:00)
Title: Fixed doneReason returning AS_DONE_STOPPED instead of AS_DONE_ERROR if an error occurs

Just a small fix where `doneReason` was returning `AS_DONE_STOPPED` instead of `AS_DONE_ERROR` if an error occurs.

`failWithErrorCode:` called `[self stop]` which has a little check at the top to set the state as `AS_STOPPED` if the state isn't `AS_DONE`. This commit sets the state as `AS_DONE` before calling `[self stop]`.