Try and avoid a crash by suppressing the socket events first before deleting
Might fix a sentry issue, unknown
This commit is contained in:
parent
0b59ef4741
commit
0b1b37a75f
|
@ -51,7 +51,13 @@ void KIWAY_PLAYER::CreateServer( int service, bool local )
|
|||
if( local )
|
||||
addr.Hostname( HOSTNAME );
|
||||
|
||||
delete m_socketServer;
|
||||
// this helps kill any events that could come in during deletion
|
||||
if( m_socketServer )
|
||||
{
|
||||
m_socketServer->Notify( false );
|
||||
delete m_socketServer;
|
||||
}
|
||||
|
||||
m_socketServer = new wxSocketServer( addr );
|
||||
|
||||
m_socketServer->SetNotify( wxSOCKET_CONNECTION_FLAG );
|
||||
|
|
Loading…
Reference in New Issue