diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-03-19 16:25:39 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-03-19 16:25:39 +0100 |
commit | 68ba8d70deb1549dd37a8325eea686c9908f926b (patch) | |
tree | 50fbabbf3cb2a52b10fc9a629195baf22b8d17ca /lib/kernel/src/gen_tcp.erl | |
parent | 662e3ffeed74d9121315d86af46430dd71e01709 (diff) | |
parent | 65ba37d1371f36a1666a53c57ac42c73692b8096 (diff) | |
download | otp-68ba8d70deb1549dd37a8325eea686c9908f926b.tar.gz otp-68ba8d70deb1549dd37a8325eea686c9908f926b.tar.bz2 otp-68ba8d70deb1549dd37a8325eea686c9908f926b.zip |
Merge branch 'ph/fix-enfile/OTP-9990' into maint
* ph/fix-enfile/OTP-9990:
Update preloaded prim_inet.beam
gen_tcp: Use correct specs for accept and listen
prim_inet: Catch system_limit in open_port
Fix returned error from gen_tcp:accept/1,2 when running out of ports
Diffstat (limited to 'lib/kernel/src/gen_tcp.erl')
-rw-r--r-- | lib/kernel/src/gen_tcp.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl index 4d6c7f5f1d..56d0451e44 100644 --- a/lib/kernel/src/gen_tcp.erl +++ b/lib/kernel/src/gen_tcp.erl @@ -175,7 +175,7 @@ try_connect([], _Port, _Opts, _Timer, _Mod, Err) -> Port :: inet:port_number(), Options :: [listen_option()], ListenSocket :: socket(), - Reason :: inet:posix(). + Reason :: system_limit | inet:posix(). listen(Port, Opts) -> Mod = mod(Opts, undefined), @@ -194,7 +194,7 @@ listen(Port, Opts) -> -spec accept(ListenSocket) -> {ok, Socket} | {error, Reason} when ListenSocket :: socket(), Socket :: socket(), - Reason :: closed | timeout | inet:posix(). + Reason :: closed | timeout | system_limit | inet:posix(). accept(S) -> case inet_db:lookup_socket(S) of @@ -208,7 +208,7 @@ accept(S) -> ListenSocket :: socket(), Timeout :: timeout(), Socket :: socket(), - Reason :: closed | timeout | inet:posix(). + Reason :: closed | timeout | system_limit | inet:posix(). accept(S, Time) when is_port(S) -> case inet_db:lookup_socket(S) of |