Right click on your channel and go to properties and Error Management tab. Then you can setup "Stop After" and "Attempt to keep channel running" options to automatically configure this.