Rolled back the previous IP getting patch, and Report connection's IP address
SVN Revision: 1452
This commit is contained in:
parent
546bb02153
commit
745106c83d
|
@ -274,8 +274,7 @@ code_change(_OldVsn, State, _Extra) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
activate_socket(#state{socket = Socket,
|
activate_socket(#state{socket = Socket,
|
||||||
sock_mod = SockMod,
|
sock_mod = SockMod}) ->
|
||||||
c2s_pid = C2SPid}) ->
|
|
||||||
PeerName =
|
PeerName =
|
||||||
case SockMod of
|
case SockMod of
|
||||||
gen_tcp ->
|
gen_tcp ->
|
||||||
|
@ -288,8 +287,7 @@ activate_socket(#state{socket = Socket,
|
||||||
case PeerName of
|
case PeerName of
|
||||||
{error, _Reason} ->
|
{error, _Reason} ->
|
||||||
self() ! {tcp_closed, Socket};
|
self() ! {tcp_closed, Socket};
|
||||||
{ok, IP} ->
|
{ok, _} ->
|
||||||
C2SPid ! {peername, IP},
|
|
||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue