Skip to content

Commit

Permalink
actually place exception-throwing line inside try
Browse files Browse the repository at this point in the history
  • Loading branch information
adferguson committed Jan 6, 2014
1 parent 78c74a7 commit 962360c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lwt/OpenFlow0x01_Switch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ let rec recv_from_switch_fd (sock : file_descr) : (xid * msg) option Lwt.t =
let send_to_switch_fd (sock : file_descr) (xid : xid) (msg : msg) : bool Lwt.t =
lwt msg_buf = Lwt.wrap2 Message.marshal xid msg in
let msg_len = String.length msg_buf in
lwt sent = Lwt_unix.write sock msg_buf 0 msg_len in
try_lwt
lwt sent = Lwt_unix.write sock msg_buf 0 msg_len in
Lwt.return (sent = msg_len)
with Unix.Unix_error (err, fn, arg) ->
Printf.printf "[platform0x01] error sending: %s (in %s)\n%!"
Expand Down

0 comments on commit 962360c

Please sign in to comment.