diff options
author | Ingela Anderton Andin <[email protected]> | 2014-04-22 09:22:04 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-04-22 09:22:04 +0200 |
commit | e438ad522009b37586b6114080ed5341bca5e373 (patch) | |
tree | b75b288404a576c3cd71c3b598edd9626a2a0b1e /lib/ssl/src | |
parent | 2b5f4b793f9ee8a8176429dea86e0a6b4915dcf9 (diff) | |
parent | 5ed7805b6609566c32b5b6728900e4ab28f34d41 (diff) | |
download | otp-e438ad522009b37586b6114080ed5341bca5e373.tar.gz otp-e438ad522009b37586b6114080ed5341bca5e373.tar.bz2 otp-e438ad522009b37586b6114080ed5341bca5e373.zip |
Merge branch 'ia/ssl/recv/OTP-11878' into maint
* ia/ssl/recv/OTP-11878:
ssl: recv shall ruturn {error, einval} on active socket
Diffstat (limited to 'lib/ssl/src')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index c2810a199f..edf49a340b 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -696,7 +696,11 @@ handle_sync_event({shutdown, How0}, _, StateName, Error -> {stop, normal, Error, State} end; - + +handle_sync_event({recv, _N, _Timeout}, _RecvFrom, StateName, + #state{socket_options = #socket_options{active = Active}} = State) when Active =/= false -> + {reply, {error, einval}, StateName, State, get_timeout(State)}; + handle_sync_event({recv, N, Timeout}, RecvFrom, connection = StateName, #state{protocol_cb = Connection} = State0) -> Timer = start_or_recv_cancel_timer(Timeout, RecvFrom), |