mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-07 11:45:36 -05:00
refactor: logerror when closing client socket
This commit is contained in:
parent
1fc544aa16
commit
de7acbaf6d
1 changed files with 2 additions and 2 deletions
|
|
@ -735,10 +735,10 @@ let handle_client_ (self:t) (client_sock:Unix.file_descr) : unit =
|
||||||
continue := false
|
continue := false
|
||||||
| exception Sys_error _ ->
|
| exception Sys_error _ ->
|
||||||
continue := false; (* connection broken somehow *)
|
continue := false; (* connection broken somehow *)
|
||||||
Unix.close client_sock;
|
|
||||||
done;
|
done;
|
||||||
_debug (fun k->k "done with client, exiting");
|
_debug (fun k->k "done with client, exiting");
|
||||||
(try Unix.close client_sock with _ -> ());
|
(try Unix.close client_sock
|
||||||
|
with e -> _debug (fun k->k "error when closing sock: %s" (Printexc.to_string e)));
|
||||||
()
|
()
|
||||||
|
|
||||||
let is_ipv6 self = String.contains self.addr ':'
|
let is_ipv6 self = String.contains self.addr ':'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue