mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
The return value of cowboy_req:peer/1 is never undefined
This commit is contained in:
parent
ce7981deb3
commit
c582335c5b
1 changed files with 1 additions and 1 deletions
|
@ -222,7 +222,7 @@ version(Req) ->
|
||||||
|
|
||||||
%% @doc Return the peer address and port number of the remote host.
|
%% @doc Return the peer address and port number of the remote host.
|
||||||
-spec peer(Req)
|
-spec peer(Req)
|
||||||
-> {undefined | {inet:ip_address(), inet:port_number()}, Req}
|
-> {{inet:ip_address(), inet:port_number()}, Req}
|
||||||
when Req::req().
|
when Req::req().
|
||||||
peer(Req) ->
|
peer(Req) ->
|
||||||
{Req#http_req.peer, Req}.
|
{Req#http_req.peer, Req}.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue