0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

The return value of cowboy_req:peer/1 is never undefined

This commit is contained in:
Loïc Hoguin 2013-05-15 14:49:44 +02:00
parent ce7981deb3
commit c582335c5b

View file

@ -222,7 +222,7 @@ version(Req) ->
%% @doc Return the peer address and port number of the remote host.
-spec peer(Req)
-> {undefined | {inet:ip_address(), inet:port_number()}, Req}
-> {{inet:ip_address(), inet:port_number()}, Req}
when Req::req().
peer(Req) ->
{Req#http_req.peer, Req}.