in descriptor.h
at very end of the class descriptor_data
old code
bool can_compress;
bool is_compressing;
new code
bool can_compress;
bool disconnected; /* fix by Keirath for close_socket */
bool is_compressing;
in descriptor.c
in void close_socket
old code
dlist.remove( d );
if( d->descriptor == maxdesc )
--maxdesc;
--num_descriptors;
deleteptr( d );
new code
/*
* fix by Keirath
*/
/* dlist.remove( d );
if( d->descriptor == maxdesc )
--maxdesc;
--num_descriptors;
deleteptr( d ); */
d->disconnected = true;
in comm.c
inside void game_loop
old code
// If no descriptors are present, why bother processing input for them?
if( dlist.size( ) > 0 )
process_input( );
#if !defined(__CYGWIN__)
#ifdef MULTIPORT
mud_recv_message( );
#endif
#endif
#ifdef IMC
imc_loop( );
#endif
new code
// If no descriptors are present, why bother processing input for them?
if( dlist.size( ) > 0 )
process_input( );
// fix by Keirath for close_socket
std::list< descriptor_data* >::iterator i = dlist.begin();
while (i != dlist.end())
{
if( (*i)->disconnected )
{
descriptor_data *s = *i++;
dlist.remove( s );
deleteptr( s );
}
else
++i;
}
#if !defined(__CYGWIN__)
#ifdef MULTIPORT
mud_recv_message( );
#endif
#endif
#ifdef IMC
imc_loop( );
#endif