Crash fix.

This commit is contained in:
Jan Vidar Krey
2009-11-21 11:47:26 +01:00
parent e994f23ea0
commit 53536f191d
6 changed files with 31 additions and 69 deletions

View File

@@ -1030,10 +1030,7 @@ void hub_disconnect_user(struct hub_info* hub, struct hub_user* user, int reason
/* stop reading from user */
net_shutdown_r(user->connection->sd);
if (net_con_close(user->connection))
{
hub_free(user->connection);
}
net_con_close(user->connection);
user->connection = 0;
LOG_TRACE("hub_disconnect_user(), user=%p, reason=%d, state=%d", user, reason, user->state);