GNOME Bugzilla – Bug 749971
gnome-software doesn't close "connections" properly
Last modified: 2015-05-29 11:43:30 UTC
Gnome-Software after it is close is still running in the background <user> 2104 0.3 2.9 1070504 120792 tty2 Sl+ 15:18 0:17 /usr/bin/gnome-software --gapplication-service and doesn't close "connections" properly tcp 1 0 192.168.1.2:58742 152.19.134.142:443 CLOSE_WAIT 2104/gnome-software tcp 1 0 192.168.1.2:36973 209.132.181.27:80 CLOSE_WAIT 2104/gnome-software This is 10+minutes after application is closed. gnome-software-3.16.2-2.fc22.x86_64
priv->session = soup_session_sync_new_with_options (SOUP_SESSION_USER_AGENT, "gnome-software", SOUP_SESSION_TIMEOUT, 5000, NULL); /** * SoupSession:timeout: * * The timeout (in seconds) for socket I/O operations * (including connecting to a server, and waiting for a reply * to an HTTP request). Did you really mean to set a timeout of 5000 seconds ? You may also want to set idle-timeout, to limit the lifetime of persistent connections. Finally, maybe we should call soup_session_abort() when the window is closed ?
Another note: SoupSessionSync is deprecated, maybe we should port to SoupSession ? https://developer.gnome.org/libsoup/2.50/libsoup-session-porting.html
Created attachment 304235 [details] [review] Port to SoupSession Since libsoup 2.42, SoupSession is no longer an abstract class and is preferred over SoupSessionSync that we've been using. Switching over brings us nicer timeout and idle-timeout defaults and an out-of-box proxy setup we no longer have to manually set up.
And another patch for stable branches that makes the timeout defaults sane without switching to SoupSession:
Created attachment 304236 [details] [review] Set soup session timeout and idle-timeout properties to 60 This ensures connections get closed in a reasonable time and not left hanging.
Comment on attachment 304236 [details] [review] Set soup session timeout and idle-timeout properties to 60 Attachment 304236 [details] pushed as d7d6e19 - Set soup session timeout and idle-timeout properties to 60
Attachment 304235 [details] pushed as 34c7b0a - Port to SoupSession