From 4add6d35ca46a2d597c91200a8844f5ceb07c80d Mon Sep 17 00:00:00 2001 From: Viacheslav Katsuba Date: Mon, 29 Nov 2021 00:26:39 +0200 Subject: [PATCH 1/2] Remove unused variable Fix warning: _build/default/plugins/rebar3_bsp/src/rebar3_bsp_gen_server.erl:44: Warning: variable 'ServerRef' is unused --- src/rebar3_bsp_gen_server.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar3_bsp_gen_server.erl b/src/rebar3_bsp_gen_server.erl index ee84ed2..2f1f72e 100644 --- a/src/rebar3_bsp_gen_server.erl +++ b/src/rebar3_bsp_gen_server.erl @@ -41,7 +41,7 @@ send_request(ServerRef, Request) -> receive_response(RequestId, Timeout) -> case wait_response(RequestId, Timeout) of timeout -> - {Pid, Mon, Ref, ServerRef} = RequestId, + {Pid, Mon, Ref, _} = RequestId, erlang:exit(Pid, kill), erlang:demonitor(Mon, [flush]), receive From fbc58d8b41278920e871dbeeb9689cbde26beaf2 Mon Sep 17 00:00:00 2001 From: Viacheslav Katsuba Date: Mon, 29 Nov 2021 11:01:12 +0200 Subject: [PATCH 2/2] Update src/rebar3_bsp_gen_server.erl Co-authored-by: Roberto Aloi --- src/rebar3_bsp_gen_server.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar3_bsp_gen_server.erl b/src/rebar3_bsp_gen_server.erl index 2f1f72e..427aa6f 100644 --- a/src/rebar3_bsp_gen_server.erl +++ b/src/rebar3_bsp_gen_server.erl @@ -41,7 +41,7 @@ send_request(ServerRef, Request) -> receive_response(RequestId, Timeout) -> case wait_response(RequestId, Timeout) of timeout -> - {Pid, Mon, Ref, _} = RequestId, + {Pid, Mon, Ref, _ServerRef} = RequestId, erlang:exit(Pid, kill), erlang:demonitor(Mon, [flush]), receive