The world should not end if a server has no peer. Let's return FALSE instead.

GAddress_copy should copy truthfully, not mangle the result if things are
going badly.  An earlier incarnation of the above.
Disable events before closing the socket, though just disabling them at all
will do.  This was the cause of the nasty 'crash on fail to bind' behaviour
that people have been seeing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2002-07-29 04:13:25 +00:00
parent 7af68c666b
commit 007c77ab4d
5 changed files with 66 additions and 39 deletions

View File

@@ -9,6 +9,7 @@
#if wxUSE_SOCKETS
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
@@ -80,6 +81,8 @@ void _GSocket_Uninstall_Callback(GSocket *socket, GSocketEvent event)
gint *m_id = (gint *)(socket->m_gui_dependent);
int c;
assert( m_id != NULL );
switch (event)
{
case GSOCK_LOST: /* fall-through */