25
25
timeout ]).
26
26
27
27
-record (reader_state , {socket , conn_name , parse_state , processor_state , state ,
28
- conserve_resources , recv_outstanding , max_frame_length , frame_length ,
28
+ conserve_resources , recv_outstanding , max_frame_size , frame_length ,
29
29
stats_timer , parent , connection , heartbeat_sup , heartbeat ,
30
30
timeout_sec % % heartbeat timeout value used, 0 means
31
31
% % heartbeats are disabled
@@ -69,7 +69,7 @@ init([SupHelperPid, Ref, Configuration]) ->
69
69
_ = register_resource_alarm (),
70
70
71
71
LoginTimeout = application :get_env (rabbitmq_stomp , login_timeout , 10_000 ),
72
- MaxFrameLength = application :get_env (rabbitmq_stomp , max_frame_length , 192 * 1024 ),
72
+ MaxFrameSize = application :get_env (rabbitmq_stomp , max_frame_size , 192 * 1024 ),
73
73
erlang :send_after (LoginTimeout , self (), login_timeout ),
74
74
75
75
gen_server2 :enter_loop (? MODULE , [],
@@ -81,7 +81,7 @@ init([SupHelperPid, Ref, Configuration]) ->
81
81
processor_state = ProcState ,
82
82
heartbeat_sup = SupHelperPid ,
83
83
heartbeat = {none , none },
84
- max_frame_length = MaxFrameLength ,
84
+ max_frame_size = MaxFrameSize ,
85
85
frame_length = 0 ,
86
86
state = running ,
87
87
conserve_resources = false ,
@@ -225,26 +225,26 @@ process_received_bytes([], State) ->
225
225
{ok , State };
226
226
process_received_bytes (Bytes ,
227
227
State = # reader_state {
228
- max_frame_length = MaxFrameLength ,
228
+ max_frame_size = MaxFrameSize ,
229
229
frame_length = FrameLength ,
230
230
processor_state = ProcState ,
231
231
parse_state = ParseState }) ->
232
232
case rabbit_stomp_frame :parse (Bytes , ParseState ) of
233
233
{more , ParseState1 } ->
234
234
FrameLength1 = FrameLength + byte_size (Bytes ),
235
- case FrameLength1 > MaxFrameLength of
235
+ case FrameLength1 > MaxFrameSize of
236
236
true ->
237
- log_reason ({network_error , {frame_too_big , {FrameLength1 , MaxFrameLength }}}, State ),
237
+ log_reason ({network_error , {frame_too_big , {FrameLength1 , MaxFrameSize }}}, State ),
238
238
{stop , normal , State };
239
239
false ->
240
240
{ok , State # reader_state {parse_state = ParseState1 ,
241
241
frame_length = FrameLength1 }}
242
242
end ;
243
243
{ok , Frame , Rest } ->
244
244
FrameLength1 = FrameLength + byte_size (Bytes ) - byte_size (Rest ),
245
- case FrameLength1 > MaxFrameLength of
245
+ case FrameLength1 > MaxFrameSize of
246
246
true ->
247
- log_reason ({network_error , {frame_too_big , {FrameLength1 , MaxFrameLength }}}, State ),
247
+ log_reason ({network_error , {frame_too_big , {FrameLength1 , MaxFrameSize }}}, State ),
248
248
{stop , normal , State };
249
249
false ->
250
250
case rabbit_stomp_processor :process_frame (Frame , ProcState ) of
0 commit comments