TeensyMud - 'A ruby mud server.'

Subject: "player" lingers upon disconnect
Subject: "player" lingers upon disconnect
Author: Massaria
Posted: 01/24/2006 08:57AM

Using the 'disconnect' command in zMud (here on user 'TEST5'), then reconnecting with another player, I get told this:

login> TEST6
TEST6

password> TEST6
*****

Create new user?
'Y'|'y' to create, Enter to retry login> y
y

Welcome TEST6@localhost!
(1) Home
This is home.

TEST5 is here.
Exits:
nrg.
TEST5 has quit.
_____________

Seems the messages linger somehow. Doesn't happen when using the 'quit' command and I'm not sure for how long they persist (longer than the 2 sec loop though), or what messages are send if I have more than one player connected when doing the disconnect.

reply
Subject: "player" lingers upon disconnect
Author: Tyche
Posted: 01/24/2006 05:32PM

Massaria wrote:
> Seems the messages linger somehow. Doesn't happen when using the 'quit' command and I'm not sure for how long they persist (longer than the 2 sec loop though), or what messages are send if I have more than one player connected when doing the disconnect.

Yep. I don't know of anyway to test a connection that has closed the other end until you attempt a read or write on it. The connection is closed when you log in with another player when we attempt to write the other player has connected message to it and fail. The closed connection will never signal a read, and doing one without a read on select is an invitation to block.

I'm almost certain this is true of any select based server. It's probably more apparent because there isn't any sort of regular timed prompt message. That is I've seen it on both Coolmud and ColdC? servers which absent a mudlib to do it don't generate prompts. I could probably trigger it to close on write error by intentionally writing a nul byte every pass. I dunno.


reply