@@ -127,16 +127,10 @@ let pp_sock_info = function
127127 | Pipe -> " Pipe"
128128 | Lock -> " Lock"
129129
130- exception SockError of socket_type * exn
131-
132130let printexn e =
133131 match e with
134- | SockError (_ , e ) -> Printf. sprintf " SockError(%s)" (Printexc. to_string e)
135132 | e -> (Printexc. to_string e)
136133
137- let clientError exn = raise (SockError (Client ,exn ))
138- let ioError exn = raise(SockError (Io ,exn ))
139-
140134type pending_status =
141135 NoEvent | Wait : 'a pending -> pending_status | TooSoon of bool
142136
@@ -359,7 +353,6 @@ let rec read c s o l =
359353 with Unix. (Unix_error ((EAGAIN | EWOULDBLOCK ),_,_))
360354 | Ssl. (Read_error (Error_want_read | Error_want_write
361355 | Error_want_connect |Error_want_accept |Error_zero_return )) -> perform_read c s o l
362- | exn -> clientError exn
363356
364357and perform_read c s o l =
365358 perform (Io {sock = c.sock; fn = (fun () -> read c s o l) })
@@ -371,7 +364,6 @@ let rec write c s o l =
371364 | Ssl. (Write_error (Error_want_read | Error_want_write
372365 | Error_want_connect |Error_want_accept |Error_zero_return )) ->
373366 perform_write c s o l
374- | exn -> clientError exn
375367
376368and perform_write c s o l =
377369 perform (Io {sock = c.sock; fn = (fun () -> write c s o l) })
@@ -391,7 +383,6 @@ let rec sendfile c fd o l =
391383 | Ssl. (Write_error (Error_want_read | Error_want_write
392384 | Error_want_connect |Error_want_accept |Error_zero_return )) ->
393385 perform_sendfile c fd o l
394- | exn -> clientError exn
395386
396387and perform_sendfile c fd o l =
397388 perform (Io {sock = c.sock; fn = (fun () -> sendfile c fd o l) })
@@ -444,15 +435,13 @@ module Io = struct
444435 with Unix. (Unix_error ((EAGAIN |EWOULDBLOCK ),_ ,_ )) ->
445436 register io;
446437 schedule_io io.sock (fun () -> read io s o l)
447- | exn -> ioError exn
448438
449439 let rec write (io :t ) s o l =
450440 try
451441 Util. single_write io.sock s o l
452442 with Unix. (Unix_error ((EAGAIN |EWOULDBLOCK ),_ ,_ )) ->
453443 register io;
454444 schedule_io io.sock (fun () -> write io s o l)
455- | exn -> ioError exn
456445
457446end
458447
@@ -857,7 +846,7 @@ let accept_loop status listens pipes maxc =
857846 with
858847 | Unix. Unix_error ((EAGAIN |EWOULDBLOCK ),_ ,_ ) -> ()
859848 | exn ->
860- (* * normal if client close connection brutally? *)
849+ (* normal if client close connection brutally? *)
861850 Log. f (Exc 1 ) (fun k -> k " Exception during epoll_wait: %s" (printexn exn ))
862851 done
863852
0 commit comments