Skip to content

Commit 07da8b4

Browse files
authored
Merge pull request #1232 from srajko/throttle-overflow-fix
Use wider int to calculate throttle window
2 parents d329e2b + c018da1 commit 07da8b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate/templates/manual/include/callback_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CallbackWrapper {
5757
}
5858
// throttle if needed
5959
uint64_t now = uv_hrtime();
60-
if(lastCallTime > 0 && now < lastCallTime + throttle * 1000000) {
60+
if(lastCallTime > 0 && now < lastCallTime + throttle * (uint64_t)1000000) {
6161
// throttled
6262
return true;
6363
} else {

0 commit comments

Comments
 (0)