mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-29 10:26:36 +01:00
Do nothing rather than assert when socket no longer found for write.
Not sure if this is a preventable error.
This commit is contained in:
parent
912859be39
commit
709108f8c3
1 changed files with 10 additions and 3 deletions
|
@ -59,18 +59,25 @@ class SocketWriteLock {
|
|||
#ifdef DEBUG_LOCKS
|
||||
logf( "tlm %p for socket %d", m_mutex, socket );
|
||||
#endif
|
||||
pthread_mutex_lock( m_mutex );
|
||||
if ( m_mutex != NULL ) {
|
||||
pthread_mutex_lock( m_mutex );
|
||||
}
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "slm %p for socket %d", m_mutex, socket );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
~SocketWriteLock() {
|
||||
#ifdef DEBUG_LOCKS
|
||||
logf( "ULM %p for socket %d", m_mutex, m_socket );
|
||||
#endif
|
||||
pthread_mutex_unlock( m_mutex );
|
||||
if ( m_mutex != NULL ) {
|
||||
pthread_mutex_unlock( m_mutex );
|
||||
}
|
||||
}
|
||||
|
||||
int socketFound() { return (int)(m_mutex != NULL); }
|
||||
|
||||
private:
|
||||
int m_socket;
|
||||
pthread_mutex_t* m_mutex;
|
||||
|
|
Loading…
Reference in a new issue