mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-05 19:00:32 -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
|
||||
| exception Sys_error _ ->
|
||||
continue := false; (* connection broken somehow *)
|
||||
Unix.close client_sock;
|
||||
done;
|
||||
_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 ':'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue