+ return false;
+ }
+
+ virtual void OnClose()
+ {
+ // tidy up after ourselves when the connection is done.
+ // We receive this event straight after a timeout, too.
+ //
+ //
+ // OK, now listen up. The weird looking check here is
+ // REQUIRED. Don't try and optimize it away.
+ //
+ // When a socket is closed, it is not immediately removed
+ // from the socket list, there can be a short delay
+ // before it is culled from the list. This means that
+ // without this check, there is a chance that a user
+ // may not exist when we come to ::Shrink them, which
+ // results in a segfault. The value of "u" may not
+ // always be NULL at this point, so, what we do is
+ // check against the fd_ref_table, to see if (1) the user
+ // exists, and (2) its the SAME user, on the same file
+ // descriptor that they were when the lookup began.
+ //
+ // Fixes issue reported by webs, 7 Jun 2006
+ if (u && (fd_ref_table[ufd] == u))
+ {
+ u->Shrink("ident_data");
+ }