Skip to content

Commit

Permalink
Merge pull request #27 from tsloughter/my-novalabsxyz-mj-write
Browse files Browse the repository at this point in the history
My novalabsxyz mj write
  • Loading branch information
tsloughter authored Nov 18, 2023
2 parents ec66251 + 8a62927 commit 1e38cff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/h2_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1184,10 +1184,13 @@ spawn_data_receiver(Socket, Streams, Flow) ->
h2_stream_set:set_socket_send_window_size(?DEFAULT_INITIAL_WINDOW_SIZE, Streams),
Type = h2_stream_set:stream_set_type(Streams),
ConnDetails = get('__h2_connection_details'),
spawn_link(fun() ->
put('__h2_connection_details', ConnDetails),
receive_data(Socket, Streams, Connection, Flow, Type, true, hpack:new_context())
end).
spawn_opt(
fun() ->
put('__h2_connection_details', ConnDetails),
receive_data(Socket, Streams, Connection, Flow, Type, true, hpack:new_context())
end,
[link, {fullsweep_after, 0}]
).


receive_data(Socket, Streams, Connection, Flow, Type, First, Decoder) ->
Expand Down
4 changes: 2 additions & 2 deletions src/h2_stream.erl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ start_link(StreamId, Streams, Connection, CallbackModule, CallbackOptions) ->
Connection,
CallbackModule,
CallbackOptions],
[]).
[{hibernate_after, 10000}]).


-spec start(
Expand All @@ -143,7 +143,7 @@ start(StreamId, Streams, Connection, CallbackModule, CallbackOptions) ->
Connection,
CallbackModule,
CallbackOptions],
[]).
[{hibernate_after, 10000}]).

send_event(Pid, Event) ->
gen_statem:cast(Pid, Event).
Expand Down
2 changes: 1 addition & 1 deletion src/h2_stream_set.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

connection :: pid(),

table = ets:new(?MODULE, [public, {keypos, 2}, {read_concurrency, true}, {write_concurrency, true}]) :: ets:tab(),
table = ets:new(?MODULE, [public, {keypos, 2}, {read_concurrency, true}]) :: ets:tab(),
%% Streams initiated by this peer
%% mine :: peer_subset(),
%% Streams initiated by the other peer
Expand Down

0 comments on commit 1e38cff

Please sign in to comment.