aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-05-26 14:38:02 +0000
committerErlang/OTP <[email protected]>2010-05-26 14:38:02 +0000
commitd82df754b6a0d4e4ea37415d66b6f07726ec849c (patch)
treee0e876f8dccba64fc8525fe9335f6d35516eb362 /lib/ssl
parent209c2c84c9487582bd1aaf186121d8bf11c40525 (diff)
downloadotp-d82df754b6a0d4e4ea37415d66b6f07726ec849c.tar.gz
otp-d82df754b6a0d4e4ea37415d66b6f07726ec849c.tar.bz2
otp-d82df754b6a0d4e4ea37415d66b6f07726ec849c.zip
Seems we need "nodelay socket flush" on some linux platforms after all.
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/src/ssl_connection.erl6
1 files changed, 6 insertions, 0 deletions
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).