Handle case when websocket closes with error but the error reason is nil.
Merge pull request #19 from niho/master

Handle case when websocket closes with error but the error reason is nil.

Thanks