We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fcfc56 commit 3edc21aCopy full SHA for 3edc21a
lwt/websocket_lwt_unix.ml
@@ -117,7 +117,8 @@ let connect ?(extra_headers = Cohttp.Header.init ())
117
Lwt.wrap2 (write_frame_to_buf ~mode:(Client random_string)) buf frame
118
>>= fun () ->
119
Lwt.catch
120
- (fun () -> Lwt_io.write oc (Buffer.contents buf))
+ (fun () ->
121
+ Lwt_io.write oc (Buffer.contents buf) >>= fun () -> Lwt_io.flush oc)
122
(fun exn ->
123
Lwt.async (fun () -> Lwt_io.close oc);
124
Lwt.fail exn)
0 commit comments