Skip to content

Commit

Permalink
squash: enforce true
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed May 17, 2024
1 parent 58e099d commit 68a8d9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion c_src/quicer_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,9 @@ controlling_process(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
ERL_NIF_TERM new_owner = argv[1];
ERL_NIF_TERM res = ATOM_OK;
BOOLEAN is_locked = FALSE;
if (argc == 3)
if (argc == 3 || IS_SAME_TERM(argv[2], ATOM_TRUE))
{
// give hint to this call that stream mutex is locked.
is_locked = TRUE;
}

Expand Down
2 changes: 1 addition & 1 deletion src/quicer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ handoff_stream(Stream, NewOwner, HandoffData) ->
Res =
case forward_stream_msgs(Stream, NewOwner) of
ok ->
case quicer_nif:controlling_process(Stream, NewOwner, unlock) of
case quicer_nif:controlling_process(Stream, NewOwner, true) of
{error, _} ->
quicer_nif:unlock_stream(Stream);
ok ->
Expand Down

0 comments on commit 68a8d9d

Please sign in to comment.