Improve handling of MSG_IO_ERROR message.