diff --git a/FnePeer.cs b/FnePeer.cs index 0a60b09..4273547 100644 --- a/FnePeer.cs +++ b/FnePeer.cs @@ -617,7 +617,7 @@ namespace fnecore PingsSent = 0; PingsAcked = 0; info.State = ConnectionState.WAITING_LOGIN; - return; + break; } } } @@ -734,6 +734,8 @@ namespace fnecore info.State = ConnectionState.RUNNING; Log(LogLevel.INFO, $"({systemName}) PEER {this.peerId} connection to MASTER completed"); + this.streamId = 0; + // userland actions FirePeerConnected(new PeerConnectedEvent(peerId, info)); } @@ -852,6 +854,8 @@ namespace fnecore PingsAcked = 0; info.State = ConnectionState.WAITING_LOGIN; + this.streamId = CreateStreamID(); + // send message to master byte[] res = new byte[8]; FneUtils.StringToBytes(Constants.TAG_REPEATER_LOGIN, res, 0, 4);