From d82df754b6a0d4e4ea37415d66b6f07726ec849c Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 26 May 2010 14:38:02 +0000 Subject: Seems we need "nodelay socket flush" on some linux platforms after all. --- lib/ssl/src/ssl_connection.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ssl') diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 6912ee8983..21c3921e22 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -2122,6 +2122,12 @@ notify_renegotiater(_) -> ok. workaround_transport_delivery_problems(Socket, Transport) -> + %% Should have the side effect that the socket is flushed on some + %% platforms e.i. linux, should be harmless otherwise. + inet:setopts(Socket, [{nodelay, true}]), + %% Standard trick to try to make sure all + %% data sent to to tcp port is really sent + %% before tcp port is closed. inet:setopts(Socket, [{active, false}]), Transport:shutdown(Socket, write), Transport:recv(Socket, 0). -- cgit v1.2.3