Browse Source

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

Loïc Hoguin 12 years ago
parent
commit
c582335c5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/cowboy_req.erl

+ 1 - 1
src/cowboy_req.erl

@@ -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}.