Don't load the soup session in idle callback
Otherwise there's a race condition which may lead to not having setup the session before loading the first page or worse, crash in libSoup.
This commit is contained in:
parent
08b756b0a6
commit
0925d31985
1 changed files with 3 additions and 3 deletions
|
@ -1228,6 +1228,8 @@ midori_load_soup_session_full (gpointer settings)
|
|||
gchar* config_file;
|
||||
SoupSessionFeature* feature;
|
||||
|
||||
midori_load_soup_session (settings);
|
||||
|
||||
config_file = build_config_filename ("logins");
|
||||
feature = g_object_new (KATZE_TYPE_HTTP_AUTH, "filename", config_file, NULL);
|
||||
g_free (config_file);
|
||||
|
@ -1246,8 +1248,6 @@ midori_load_soup_session_full (gpointer settings)
|
|||
soup_session_add_feature (session, feature);
|
||||
g_object_unref (feature);
|
||||
|
||||
g_idle_add (midori_load_soup_session, settings);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2267,7 +2267,7 @@ main (int argc,
|
|||
G_CALLBACK (midori_soup_session_block_uris_cb),
|
||||
g_strdup (block_uris));
|
||||
midori_setup_inactivity_reset (browser, inactivity_reset, webapp);
|
||||
g_idle_add (midori_load_soup_session, settings);
|
||||
midori_load_soup_session (settings);
|
||||
midori_startup_timer ("App created: \t%f");
|
||||
gtk_main ();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue