aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorWojtek Mach <[email protected]>2019-02-09 17:47:56 +0100
committerWojtek Mach <[email protected]>2019-02-09 17:58:22 +0100
commit45f277dcff0bab3b90e39e4b24ffc1f5bb6c3f3e (patch)
tree3670513b2d32518950b75c4348e8b431894a3fa2 /lib
parentbd1551d88022195b93910ba682b59a34cffed0fa (diff)
downloadotp-45f277dcff0bab3b90e39e4b24ffc1f5bb6c3f3e.tar.gz
otp-45f277dcff0bab3b90e39e4b24ffc1f5bb6c3f3e.tar.bz2
otp-45f277dcff0bab3b90e39e4b24ffc1f5bb6c3f3e.zip
gen_udp: Update open/1-2 and recv/3 specs
* `open/1-2` can return `{error, system_limit}` * `recv/3` can return `{error, timeout}`
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/gen_udp.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kernel/src/gen_udp.erl b/lib/kernel/src/gen_udp.erl
index d6e8652e77..fad7b2f887 100644
--- a/lib/kernel/src/gen_udp.erl
+++ b/lib/kernel/src/gen_udp.erl
@@ -95,7 +95,7 @@
-spec open(Port) -> {ok, Socket} | {error, Reason} when
Port :: inet:port_number(),
Socket :: socket(),
- Reason :: inet:posix().
+ Reason :: system_limit | inet:posix().
open(Port) ->
open(Port, []).
@@ -112,7 +112,7 @@ open(Port) ->
| {bind_to_device, binary()}
| option(),
Socket :: socket(),
- Reason :: inet:posix().
+ Reason :: system_limit | inet:posix().
open(Port, Opts0) ->
{Mod, Opts} = inet:udp_module(Opts0),
@@ -186,7 +186,7 @@ recv(S,Len) when is_port(S), is_integer(Len) ->
Port :: inet:port_number(),
AncData :: inet:ancillary_data(),
Packet :: string() | binary(),
- Reason :: not_owner | inet:posix().
+ Reason :: not_owner | timeout | inet:posix().
recv(S,Len,Time) when is_port(S) ->
case inet_db:lookup_socket(S) of