Reconnect on read error, also fix whitespace

Forces reconnect when read fails.