Skip to content

Commit

Permalink
Unconditionally log protocol version negotiation
Browse files Browse the repository at this point in the history
  • Loading branch information
reynir committed Nov 25, 2020
1 parent 9731ffc commit 446c859
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/rExec.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ let with_flow ~ty ~domid ~port fn =
recv_hello client >>= function
| version when version < 2l -> fail (error "Unsupported qrexec version %ld" version)
| version ->
if version > 2l
then Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
send_hello client >|= fun () ->
Flow.create ~ty client
)
Expand Down Expand Up @@ -379,8 +378,7 @@ let connect ~domid () =
recv_hello t.t >>= function
| version when version < 2l -> fail (error "Unsupported qrexec version %ld" version)
| version ->
if version > 2l
then Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
Log.debug (fun f -> f "Other end wants to use newer protocol %lu, \
continuing with version 2" version);
Log.info (fun f -> f "client connected, using protocol version 2");
return t

0 comments on commit 446c859

Please sign in to comment.