shutdown and delete the cached connection in case of read error
handle syswrite() returning undef