diff options
Diffstat (limited to 'lib/net/tcpconn.ex')
-rw-r--r-- | lib/net/tcpconn.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/net/tcpconn.ex b/lib/net/tcpconn.ex index a16a62e..7d82601 100644 --- a/lib/net/tcpconn.ex +++ b/lib/net/tcpconn.ex @@ -51,7 +51,8 @@ defmodule SNet.TCPConn do conn_my_skey: sess_skey, conn_his_pkey: cli_sess_pkey, addr: addr, - port: port + port: port, + his_port: his_port } GenServer.cast(Shard.Manager, {:peer_up, cli_pkey, self(), addr, his_port}) Logger.info "New peer: #{print_id state} at #{inspect addr}:#{port}" @@ -98,7 +99,7 @@ defmodule SNet.TCPConn do def handle_info({:tcp_closed, _socket}, state) do Logger.info "Disconnected: #{print_id state} at #{inspect state.addr}:#{state.port}" - GenServer.cast(Shard.Manager, {:peer_down, state.his_pkey, state.addr, state.port}) + GenServer.cast(Shard.Manager, {:peer_down, state.his_pkey, state.addr, state.his_port}) exit(:normal) end |