This new patch for flood_socket_keepalive.c fixes some issues discovered during opening and closing sockets. Predicated on the changes previously made to the socket structure (reference my email with the 6 diffs), the reopen_socket member, which has now been changed to "available", now takes on an ordered enum of values. The keepalive_begin_conn() function has been modified to properly handle error conditions and transitions, which can occur between pages using ssl or no ssl, different hosts, or different ports and require closure of the previous connection.
Other changes: keepalive_end_conn() also contains logic to prevent certain error conditions from crashing the function. The setting of the socket's associated request, which was established in the patch mentioned above, has been moved to the case where sockets are not being opened, since otherwise the open_socket() or ssl_open_socket() function sets the request. Please review the attached diff, which compares the latest flood_socket_keepalive.c file with the version produced from the patch creating the unified socket structure, which is named flood_socket_keepalive_2.c -Norman Tuttle, Developer, OpenDemand Systems ([EMAIL PROTECTED])