diff options
author | Joe Shaw <joe@ximian.com> | 2004-02-10 22:52:15 +0000 |
---|---|---|
committer | Joe Shaw <joeshaw@src.gnome.org> | 2004-02-10 22:52:15 +0000 |
commit | 2908e4a9e1a13264135b74a7f392627f3ded1a45 (patch) | |
tree | b18b494d03728e157eacee7e635dbbdb9b7cd256 /libsoup/soup-connection.c | |
parent | 4823590667b454085d8ecc773812fa55290320b5 (diff) | |
download | libsoup-2908e4a9e1a13264135b74a7f392627f3ded1a45.tar.gz |
Add a workaround for SSL connections which time-out but don't close the
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.
Diffstat (limited to 'libsoup/soup-connection.c')
-rw-r--r-- | libsoup/soup-connection.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index d2ca4020..c38cc84d 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -554,6 +554,15 @@ soup_connection_disconnect (SoupConnection *conn) 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; } /** |