Close both input and output channel once connection handled.
Fix fd leak on server when retrieving (dump) data files.