add autoreconnect support on read errors