From 6e674886825d36a08ea2e5b4ae89f9e996f79ac6 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 15 Mar 2023 19:24:04 +0100 Subject: `primary_selection`: Add backoff time between retries (#215) --- plugins/primary_selection.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/primary_selection.lua b/plugins/primary_selection.lua index 4f8d71a..e061b76 100644 --- a/plugins/primary_selection.lua +++ b/plugins/primary_selection.lua @@ -106,6 +106,7 @@ local function delayed_copy() if written == 0 or not written then if retry > 0 then retry = retry - 1 + coroutine.yield(((3-retry) ^ 2) * 0.05) else core.error("Error while setting primary selection. "..(err or "")) break -- cgit v1.2.3