1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

core: run hook_url callback when pthread_create failed

This commit is contained in:
Trygve Aaberge
2023-10-13 09:25:39 +02:00
parent 6468f7761f
commit 57b2efd82b
+5
View File
@@ -220,6 +220,11 @@ hook_url_transfer (struct t_hook *hook)
&hook_url_transfer_thread, hook);
if (rc != 0)
{
snprintf (str_error, sizeof (str_error),
"error calling pthread_create (%d)", rc);
hashtable_set (HOOK_URL(hook, output), "error", str_error);
hook_url_run_callback (hook);
gui_chat_printf (NULL,
_("%sError running thread in hook_url: %s (URL: \"%s\")"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],