drain err chan which might block during shutdown