diff --git a/src/h2_connection.erl b/src/h2_connection.erl index 11f0c460..7bf54cf0 100644 --- a/src/h2_connection.erl +++ b/src/h2_connection.erl @@ -1582,5 +1582,15 @@ recv_data(Stream, Frame) -> %% anyway. ok; Pid -> + NotifyPid = h2_stream_set:notify_pid(Stream), + recv_data_cb(NotifyPid, Frame), gen_fsm:send_event(Pid, {recv_data, Frame}) end. + +recv_data_cb(Pid, {#frame_header{ + flags=Flags, + type=?DATA + }, Payload}) -> + Bin = h2_frame_data:data(Payload), + Pid ! {'RECV_DATA', Bin}; +recv_data_cb(_, _) -> ok.