diff --git a/lib/rExec.ml b/lib/rExec.ml index 66054c5..2505bd4 100644 --- a/lib/rExec.ml +++ b/lib/rExec.ml @@ -217,9 +217,9 @@ 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.info (fun f -> f "client connected, \ + other end wants to use protocol version %lu, \ + continuing with version 2" version); send_hello client >|= fun () -> Flow.create ~ty client ) @@ -376,6 +376,10 @@ let connect ~domid () = QV.server ~domid ~port:vchan_base_port () >>= fun t -> let t = { t; clients = Hashtbl.create 4; counter = 0; } in send_hello t.t >>= fun () -> - recv_hello t.t >>= fun version -> - Log.info (fun f -> f "client connected, using protocol version %ld" version); - return t + recv_hello t.t >>= function + | version when version < 2l -> fail (error "Unsupported qrexec version %ld" version) + | version -> + Log.info (fun f -> f "client connected, \ + other end wants to use protocol version %lu, \ + continuing with version 2" version); + return t