Make sure start_listening_socket does everything, this will lead the way to multiple listen ports.

This commit is contained in:
Jan Vidar Krey
2010-01-21 17:26:27 +01:00
parent c47ea14047
commit 21a5981905
6 changed files with 75 additions and 61 deletions

View File

@@ -165,23 +165,13 @@ void net_event(struct net_connection* con, int event, void *arg)
LOG_TRACE("net_event() : fd=%d, ev=%d, arg=%p", fd, (int) event, arg);
#endif
if (event == NET_EVENT_SOCKERROR)
{
hub_disconnect_user(g_hub, user, quit_socket_error);
return;
}
else if (event == NET_EVENT_CLOSED)
{
hub_disconnect_user(g_hub, user, quit_disconnected);
return;
}
else if (event == NET_EVENT_TIMEOUT)
if (event == NET_EVENT_TIMEOUT)
{
if (user_is_connecting(user))
{
hub_disconnect_user(g_hub, user, quit_timeout);
return;
}
return;
}
if (event & NET_EVENT_READ)