Skip to content

Fix type cast for lockwait - #5862

Merged
matyhtf merged 1 commit into
swoole:5.1.xfrom
Appla:fix_lockwait
Sep 25, 2025
Merged

matyhtf merged 1 commit into
swoole:5.1.xfrom
Appla:fix_lockwait

Conversation

@Appla

@Appla Appla commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

The current implementation of lockwait discards the decimal portion of the input. For example, lockwait(1.2) is incorrectly converted to 1 * 1000 = 1000 milliseconds, instead of the expected 1.2 * 1000 = 1200 milliseconds.

This MR is also applicable to the master branch.

@codecov

codecov Bot commented Sep 24, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.61%. Comparing base (3074add) to head (2ad12f2).
⚠️ Report is 1 commits behind head on 5.1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##            5.1.x    #5862      +/-   ##
==========================================
+ Coverage   71.48%   71.61%   +0.13%     
==========================================
  Files         105      105              
  Lines       16144    16144              
  Branches     2967     2967              
==========================================
+ Hits        11540    11561      +21     
+ Misses       4549     4527      -22     
- Partials       55       56       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matyhtf

matyhtf commented Sep 25, 2025

Copy link
Copy Markdown
Member

@Appla There is a bug here. Your code is correct and has been merged

@matyhtf
matyhtf merged commit 40c1181 into swoole:5.1.x Sep 25, 2025
30 of 37 checks passed
matyhtf pushed a commit that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants