Remove unnecessary sleep after google account pairing. Fixes #22

This commit is contained in:
Tulir Asokan 2024-05-30 20:06:42 +03:00
parent 0236ea64b6
commit c1c9455c16

View file

@ -364,10 +364,6 @@ func (c *Client) DoGaiaPairing(ctx context.Context, emojiCallback func(string))
c.triggerEvent(&events.PairSuccessful{PhoneID: fmt.Sprintf("%s/%d", c.AuthData.Mobile.GetSourceID(), destRegUnknownInt)})
go func() {
// Sleep for a bit to let the phone save the pair data. If we reconnect too quickly,
// the phone won't recognize the session the bridge will get unpaired.
time.Sleep(2 * time.Second)
err := c.Reconnect()
if err != nil {
c.triggerEvent(&events.ListenFatalError{Error: fmt.Errorf("failed to reconnect after pair success: %w", err)})