[sr-dev] git:master:631aab42: cdp: safety check closing fd for error cases