Flush the output channel before we close the fd beneath it
Flush the output channel before we close the fd beneath it

We probably should support connection re-use sometime.

Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>

koushikcgit/xenopsd,cheng--zhang/xenopsd,koushikcgit/xenopsd,euanh/xenopsd,cheng--zhang/xenopsd,koushikcgit/xenopsd,simonjbeaumont/xenopsd,djs55/xenopsd,euanh/xenopsd,djs55/xenopsd,johnelse/xenopsd,djs55/xenopsd-previous,johnelse/xenopsd,djs55/xenopsd-previous,thomassa/xenopsd,thomassa/xenopsd,cheng--zhang/xenopsd,johnelse/xenopsd,simonjbeaumont/xenopsd,simonjbeaumont/xenopsd,djs55/xenopsd-previous,thomassa/xenopsd,djs55/xenopsd,euanh/xenopsd