mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
Always close sockets we're done with. Otherwise they leak -- don't get reused.
This commit is contained in:
parent
37dc9b7b88
commit
a680a6e5fe
1 changed files with 4 additions and 1 deletions
|
@ -64,6 +64,8 @@ XWThreadPool::XWThreadPool()
|
|||
}
|
||||
m_pipeRead = fd[0];
|
||||
m_pipeWrite = fd[1];
|
||||
logf( XW_LOGINFO, "pipes: m_pipeRead: %d; m_pipeWrite: %d",
|
||||
m_pipeRead, m_pipeWrite );
|
||||
}
|
||||
|
||||
XWThreadPool::~XWThreadPool()
|
||||
|
@ -153,7 +155,8 @@ XWThreadPool::CloseSocket( int socket )
|
|||
++iter;
|
||||
}
|
||||
}
|
||||
/* close( socket ); */
|
||||
logf( XW_LOGINFO, "CLOSING socket %d", socket );
|
||||
close( socket );
|
||||
/* if ( do_interrupt ) { */
|
||||
/* We always need to interrupt the poll because the socket we're closing
|
||||
will be in the list being listened to. That or we need to drop sockets
|
||||
|
|
Loading…
Add table
Reference in a new issue