From bd1ce11306527514218acbe0d12f7bcc23114239 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Thu, 26 May 2022 18:19:24 -0700 Subject: Fix multiple issues with v1.8+ login sequence Squashed bugs: * A v1.8+ user that has connected but not agreed will show up in chat and the userlist as a blank user name * Race condition where a v1.8+ user in connected but not agreed state duplicated the ID of the next user to connect * A v1.8+ user that is connected but not agreed will receive the user list --- hotline/transaction_handlers.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'hotline/transaction_handlers.go') diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index ea46499..ade024c 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -821,11 +821,8 @@ func (cc *ClientConn) notifyNewUserHasJoined() (res []Transaction, err error) { } func HandleTranAgreed(cc *ClientConn, t *Transaction) (res []Transaction, err error) { - bs := make([]byte, 2) - binary.BigEndian.PutUint16(bs, *cc.Server.NextGuestID) - + cc.Agreed = true cc.UserName = t.GetField(fieldUserName).Data - *cc.ID = bs *cc.Icon = t.GetField(fieldUserIconID).Data options := t.GetField(fieldOptions).Data -- cgit