ROT server keeps spamming chars off

Posted by Typhon on Sun 29 Jun 2003 08:03 PM — 5 posts, 20,305 views.

USA #0
im tryin to help out a friend and im tryin to figure out this bug... ive never noticed this alone but when fighting in a group of 2 or more players the mud bugs and the character is disconnected.. i get..

Write_to_descriptor: Resource temporarily unavailable
Sun Jun 29 15:10:07 2003 :: Closing link to Typhon.
Sun Jun 29 15:10:07 2003 :: [*****] BUG: xAct_new: bad code 10.
Sun Jun 29 15:10:07 2003 :: [*****] BUG: xAct_new: bad code 10.

the bug only happens mid fight and the only time i've been disconnected is when i was fighting in a group.. almost like i was being spammed off..
thanks
-typ
Australia Forum Administrator #1
"Resource temporarily unavailable" means a "send" to the TCP/IP socket has blocked but you have a non-blocking socket.

It is normal to have non-blocking sockets (in this sort of situation), so the bug is that the server is not detecting the "would block" error return and simply queuing up the write to be done later.
USA #2
is there any way to go around it or some way to keep people from getting spammed off?
Australia Forum Administrator #3
Yes there is a way around it. Fix the bug.

You haven't said what code exactly your friend is using - is it stock ROM? Or has s/he added something?

I don't recall complaints of this nature about stock ROM, but may be wrong.

Possibly if someone added "an extra message" without understanding sockets programming they might easily cause this problem.

Failing that, you have a clue *where* it is happening, the message "write_to_descriptor" would be found in the code (maybe more than once). If more than once, make them unique (eq. "write_to_descriptor_1") and so on, and then when you work out which one it is, look closely at the error check directly after the write.
USA #4
his mud is a highly modded rot mud but i have a copy of stock rot that has the same bug in it.. ill try to narrow it down more though