refactor the restart logic, we can't rely on the exit code to determine
whether the client disconnected (and thus killed avconv) or if it just
randomly died