Add a new property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
authorDan Winship <danw@src.gnome.org>
Tue, 18 Mar 2008 23:38:00 +0000 (23:38 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 18 Mar 2008 23:38:00 +0000 (23:38 +0000)
commitf79ed61e0330b9f8e13243960624657f2cd92a0e
tree41c849743d219cf1417e7f302038bcd229dc81c0
parent10d4ed0d5d64d97a86730e42237bc7d8a2579bb2
Add a new property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after

* libsoup/soup-session.c (soup_session_class_init): Add a new
property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
which idle connections should be closed.
(soup_session_get_connection): pass the idle_timeout value on to
the connection.

* libsoup/soup-connection.c (soup_connection_class_init): Add
SOUP_CONNECTION_IDLE_TIMEOUT.
(start_idle_timer, stop_idle_timer): add/remove a timeout to call
soup_connection_disconnect().
(socket_connect_result, soup_connection_connect_sync): start the
idle timer after connection is complete
(set_current_request): call stop_idle_timer() when starting a new
request
(clear_current_request): call start_idle_timer() when finishing a
request
(dispose): call stop_idle_timer() when destroying the connection

#518214, based on a patch from Jorn Baayen.

svn path=/trunk/; revision=1112
ChangeLog
libsoup/soup-connection.c
libsoup/soup-connection.h
libsoup/soup-session.c
libsoup/soup-session.h