[GH-ISSUE #556] [Scripting] Sleep function only works when used with 'await' #552

Open
opened 2026-03-03 19:51:17 +03:00 by kerem · 0 comments
Owner

Originally created by @kics223w1 on GitHub (Nov 12, 2025).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/556

Originally assigned to: @kics223w1 on GitHub.

Description

The sleep function in the Scripting Tool only works when used with the await keyword.


Steps to Reproduce

async function onRequest(context, url, request) {
    console.log(url);

    // This line will NOT delay execution
    sleep(5000);

    return request;
}

Current Behavior

  • The sleep function only works correctly when prefixed with await.

Expected Behavior

  • The sleep function should work as intended even without the await prefix.

Environment

  • App Version: 3.4.0
  • OS: Windows / Linux
Originally created by @kics223w1 on GitHub (Nov 12, 2025). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/556 Originally assigned to: @kics223w1 on GitHub. ## Description The `sleep` function in the **Scripting Tool** only works when used with the `await` keyword. --- ## Steps to Reproduce ```js async function onRequest(context, url, request) { console.log(url); // This line will NOT delay execution sleep(5000); return request; } ``` ## Current Behavior - The sleep function only works correctly when prefixed with await. ## Expected Behavior - The sleep function should work as intended even without the await prefix. ## Environment - App Version: 3.4.0 - OS: Windows / Linux
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxyman-windows-linux#552
No description provided.