Skip to content

Commit c2217e3

Browse files
committed
fix os:system_time/1 time unit in credit_flow trace events, which is crashing
messaging components which use flow control when calling credit_flow:block/1, credit_flow:unblock/1 and/or via credit_flow:peer_down/1 and handle_bump_msg/1. This can crash all messaging components (connections, channels, queues, msg-store) when trace is enabled and flow is set or cleared (amqp-1.0 included).
1 parent 3f16a1c commit c2217e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbit_common/src/credit_flow.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@
9999
{from_info, erlang:process_info(FROM)},
100100
{timestamp,
101101
os:system_time(
102-
milliseconds)}])).
102+
millisecond)}])).
103103
-define(TRACE_UNBLOCKED(SELF, FROM), rabbit_event:notify(credit_flow_unblocked,
104104
[{process, SELF},
105105
{from, FROM},
106106
{timestamp,
107107
os:system_time(
108-
milliseconds)}])).
108+
millisecond)}])).
109109
-else.
110110
-define(TRACE_BLOCKED(SELF, FROM), ok).
111111
-define(TRACE_UNBLOCKED(SELF, FROM), ok).

0 commit comments

Comments
 (0)