Reset writer state on flash error (#330)
Reset writer state on flash error (#330)

Not doing so leads the writer state to have a `progress` of `100%`,
while `isFlashing()` is `false`, which is an inconsistent state.

Fixes: https://github.com/resin-io/etcher/issues/327
Signed-off-by: Juan Cruz Viotti <8493db2a4f45d66df375afe12f7eba59fe1c8d78@gmail.com>
cedricve/etcher,resin-io/herostratus,cedricve/etcher,cedricve/etcher,resin-io/etcher,resin-io/etcher,resin-io/etcher,resin-io/etcher,resin-io/resin-etcher,resin-io/resin-etcher,resin-io/herostratus,resin-io/etcher