Issue information

Issue ID
#932
Status
Invalid
Severity
Medium
Started
Hercules Elf Bot
Feb 6, 2008 12:55
Last Post
Hercules Elf Bot
Apr 19, 2012 18:07
Confirmation
N/A

Hercules Elf Bot - Feb 6, 2008 12:55

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=932

I identified the reason why I got a map-char-client disconnect every time I tried to log back to the char server.
It's because the mapserver spams the charserver with a lot of data, enough to overload the socket buffer and cause the network layer to issue a WSAEWOULDBLOCK (= EAGAIN) error.

The problem is that eapp is using errno and comparing against EAGAIN, when on Windows, socket status doesn't go through errno. Thus the comparison fails, the server declares the connection as 'dead' and closes it. EAthena solves this by a wrapper, where WSAGetLastError() is called instead of errno() on Windows.

This post has been edited by theultramage: Feb 8 2008, 02:06 AM