close read/write streams on connection failure