Disconnect read loop in case of errors