mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2012
Posts: 2
X
Bowl of petunias
OP Offline
Bowl of petunias
X
Joined: May 2012
Posts: 2
Probably something you won't notice unless someone else tells you. I'm running mIRC 7.22, and whenever I quit mIRC, the server always gives the quit reason as "Input/output error". I've tried closing by clicking the X button in the title bar, Alt+F4 and File>Quit, and all 3 give the same problem.

Not really a major bug but thought I would report it anyway!

EDIT: Only seems to happen sometimes? Now I've tried it a few more times it seems to happen sporadically...

Last edited by Xycaleth; 20/05/12 12:22 PM.
Joined: Feb 2006
Posts: 74
G
gbz Offline
Babel fish
Offline
Babel fish
G
Joined: Feb 2006
Posts: 74
I've seen this happening for years. To my knowledge it occurs whenever an SSL connection is ended with /disconnect rather than /quit. Quitting mIRC in the ways you described sends a /disconnect, so that should be why you (or others) are seeing that "Input/output error" message when you are terminating an SSL connection.

This issue has been around as long as I can remember, probably ever since mIRC got built in SSL support. I reported it many years ago, but unfortunately never received any replies.

I'm not sure if mIRC or OpenSSL is to blame for this, but I do know that back in the days before mIRC had SSL support, I was using Stunnel and StunTour for SSL connections, and with at least one of them, I didn't see this issue when using /disconnect.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for your post. This issue is due to the way mIRC performs a hard disconnect from a server. It applies to both SSL and non-SSL connections.

When you disconnect from the server, or use /disconnect, mIRC sends a QUIT message to the server and then closes the connection immediately. In some situations, this may prevent the server from seeing the QUIT message which can result in the issue you describe.

Many versions ago I changed mIRC to perform a soft disconnect, similar to using the /quit command, where it would send the QUIT message and then wait for confirmation of the closed connection, and any close or quit messages, from the server. If no confirmation was received within a few seconds, mIRC closed the connection automatically. Unfortunately many users complained about the behaviour, so it was removed in a subsequent version of mIRC.

Joined: Feb 2006
Posts: 74
G
gbz Offline
Babel fish
Offline
Babel fish
G
Joined: Feb 2006
Posts: 74
Originally Posted By: Khaled
It applies to both SSL and non-SSL connections.

Hmm. I have been dealing with this issue since mIRC introduced SSL support and have never once seen this happen on an unencrypted connection, no matter how I disconnected it (usually by clicking the disconnect toolbar button or closing mIRC using the X in the upper right corner).

Using SSL on the other hand, I can pretty much reproduce this issue at will: When I terminate such a connection in the ways described above, "Input/output error" shows up about 9 times out of 10. This is why I've always thought it must be related to SSL being "in between" things and possibly not forwarding the quitmsg correctly.

Is there really nothing that can be done except use /quit to close secure connections? I'd be glad to help track this down if there's anything I can do/test.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
In short, you've been lucky. I imagine an SSL teardown is slightly slower than a regular connection, or, slow enough that you get caught up every now and then (in your case, more times than not). Your connection just happens to be such that a normal connection quits just in time, but an SSL connection is just beyond that threshold.

As Khaled said, there's nothing else to track down, the underlying cause of this issue is well known and expected in the case where /disconnect is used-- and it was explained why mIRC behaves this way.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: May 2012
Posts: 2
X
Bowl of petunias
OP Offline
Bowl of petunias
X
Joined: May 2012
Posts: 2
Were the complaints due to the window taking longer than usual to visibly close? It seems to me you could close the window, while leaving the connection active until the confirmation was received, or until a timeout was exceeded (thereby closing the connection automatically).

In any case, thanks for clearing this up for me.

Joined: Aug 2006
Posts: 167
P
Vogon poet
Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
Just an idea... but since this never stops coming up, here's a way the issue could be resolved that might satisfy both groups of people:

1) Let /quit continue to wait indefinitely for server disconnection confirmation (as it does now)

2) For legacy script compatibility, let /disconnect continue to force immediate hard disconnects; however, add an -s switch which forces /disconnect to attempt a soft disconnect for 3-4 seconds (so scripts may invoke such behavior if desired).

3) For closing mIRC itself: add an "attempt soft disconnect upon close" ALT-O option. If unchecked, "/disconnect" behavior occurs when closing mIRC. If checked, "/disconnect -s" behavior occurs when closing mIRC, and this box appears when the soft disconnect attempt begins:

Code:
,-------------------------------,
| Exiting                       |
|-------------------------------|
| Logging out of server(s)...   |
|                               |
|         [ Close Now ]         |
|_______________________________|

This way mIRC closes after 3-4 seconds if the server doesn't respond (as with many versions ago), but users who don't know about (or bother to learn of) the ALT-O option have a "bailout" button to force immediate closure.

Last edited by pishposh; 22/05/12 11:56 PM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
The problem has to do with a lot of underlying issues, I think. Hiding the window just hides the symptom, not the problem. I could be wrong, but the complaints were coming from the fact that mIRC corrupts data (scripts, logs) if it takes too long to close during a shutdown. In this case, Windows will forcibly kill the process, screwing with the way mIRC keeps file handles open to scripts/logs, and corrupting data. This is still an occasional complaint, but I imagine if mIRC used to stay open longer, it was probably a bigger issue and prompted the reversion.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Last I checked, Khaled was trying to minimize the number of options, not add more. Adding a switch for every minor detail about program function is fun for users, but not for the maintainer. I personally don't think this is a big enough deal to warrant a setting, let alone command switches.

If you're doing this in a script, you can just not use /disconnect, anyway. No need to add a switch to make /disconnect behave like /quit when you can just /quit.

By the way, there is already an "exit confirmation" dialog that pops up on exiting (by default). Your proposal would add yet another dialog, making for a pretty ugly UX. There would now be two boxes to click if they wanted to exit and bailout. They could change options, but this is what new users will be seeing.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard