From f2268680ac2fb89ac9cc707e15db7a0a80a5c797 Mon Sep 17 00:00:00 2001 From: jun7 Date: Fri, 19 Jan 2018 21:35:19 +0900 Subject: [PATCH] Add flag thread end --- ephy-uri-tester.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ephy-uri-tester.c b/ephy-uri-tester.c index 921961b..2a6a754 100644 --- a/ephy-uri-tester.c +++ b/ephy-uri-tester.c @@ -924,6 +924,7 @@ ephy_uri_tester_load (EphyUriTester *tester) #include static EphyUriTester *uri_tester; static GThread *initt = NULL; +static bool tend = false; static gboolean reqcb (WebKitWebPage *web_page, WebKitURIRequest *request, @@ -946,7 +947,7 @@ static gboolean reqcb (WebKitWebPage *web_page, if (initt) { SoupMessageHeaders *head = webkit_uri_request_get_http_headers(request); - if (head) + if (head || tend) { g_thread_join(initt); initt = NULL; @@ -979,6 +980,7 @@ static gboolean reqcb (WebKitWebPage *web_page, static gpointer inittcb(gpointer data) { ephy_uri_tester_load(uri_tester); + tend = true; return NULL; }