File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,10 @@ module Transport = struct
275275
276276 let rec read_from_tcp t ke buf flow =
277277 match Mnet.TCP. read flow buf with
278- | (exception _ ) | 0 -> ()
278+ | 0 -> Log. debug (fun m -> m " TCP connection closed by peer" )
279+ | exception exn ->
280+ Log. err (fun m ->
281+ m " TCP connection failed with: %s" (Printexc. to_string exn ))
279282 | len ->
280283 let str = Bytes. sub_string buf 0 len in
281284 Ke. push ke str;
@@ -284,7 +287,10 @@ module Transport = struct
284287
285288 let rec read_from_tls t ke buf flow =
286289 match Mnet_tls. read flow buf with
287- | (exception _ ) | 0 -> ()
290+ | 0 -> Log. debug (fun m -> m " TLS connection closed by peer" )
291+ | exception exn ->
292+ Log. err (fun m ->
293+ m " TLS connection failed with: %s" (Printexc. to_string exn ))
288294 | len ->
289295 let str = Bytes. sub_string buf 0 len in
290296 Ke. push ke str;
You can’t perform that action at this time.
0 commit comments