As I tried to point out earlier, CID's are assigned when a connection is established, but they are not unassigned when that connection is closed.
At some point a CID of 25 was created, and later on, that connection was closed. mIRC sees that there is no connection for CID 25 and returns the error you are getting.