ensure login sequence has stream ID set; incorrect return vs break;

4.32j_maint
Bryan Biedenkapp 10 months ago
parent 78e74f9074
commit 054954fad3

@ -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);

Loading…
Cancel
Save

Powered by TurnKey Linux.