+2004-02-10 Joe Shaw <joe@ximian.com>
+
+ * libsoup/soup-connection.c (soup_connection_disconnect): Add a
+ workaround for SSL connections which time-out but don't close the
+ socket until we try sending data again later.
+
+ * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
+ Don't free the sockaddr from soup_address_get_sockaddr(); we don't
+ own it, the SoupAddress does.
+
2004-02-09 JP Rosevear <jpr@ximian.com>
* configure.in: Bump libtool numbers
g_object_unref (conn->priv->socket);
conn->priv->socket = NULL;
g_signal_emit (conn, signals[DISCONNECTED], 0);
+
+ /* Workaround for timed-out SSL connections. Check to see if
+ * there is a message associated with this connection and that
+ * it's not the first time this connection has been used. If met,
+ * setting the status to QUEUED will cause the connection to be
+ * restarted and the message resent.
+ */
+ if (conn->priv->cur_req && conn->priv->last_used != 0)
+ conn->priv->cur_req->status = SOUP_MESSAGE_STATUS_QUEUED;
}
/**
sock->priv->sockfd = socket (sa->sa_family, SOCK_STREAM, 0);
if (sock->priv->sockfd == -1) {
- g_free (sa);
goto done;
}
update_fdflags (sock);
status = connect (sock->priv->sockfd, sa, len);
- g_free (sa);
if (status == -1) {
if (errno == EINPROGRESS) {
close (sock->priv->sockfd);
sock->priv->sockfd = -1;
}
- if (sa)
- g_free (sa);
+
return FALSE;
}