diff options
author | Alex Auvolat <alex@adnab.me> | 2018-08-27 22:40:34 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-08-27 22:40:34 +0200 |
commit | 0faa792c979788efb8cf8b80a3534f770d8b1a65 (patch) | |
tree | 5a3a7feb5a7ea5c9f764b6d324a0a0ccd9bebe55 /lib/net | |
parent | 233989490b0b01670b03154f9e8f83be13e5a89a (diff) | |
download | shard-0faa792c979788efb8cf8b80a3534f770d8b1a65.tar.gz shard-0faa792c979788efb8cf8b80a3534f770d8b1a65.zip |
Fix port issues
Diffstat (limited to 'lib/net')
-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 |