diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-25 11:44:04 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-25 11:44:04 +0200 |
| commit | b4be281671ecfe5c1e6f831614ca1dde48522cd7 (patch) | |
| tree | 60607908ae545d32aabc08d86d22444003744d65 /client/client.go | |
| parent | c9603e4a2ec682ca30399205ccbf533f55230ad4 (diff) | |
Client + FSM: Remove background argument from transition
This fixes a race condition reported by Go's -race flag
In the future we should use waitgroups to ensure the OAuth local listener is started before we sent the URL
Diffstat (limited to 'client/client.go')
| -rw-r--r-- | client/client.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/client.go b/client/client.go index 5377801..0f9f536 100644 --- a/client/client.go +++ b/client/client.go @@ -119,7 +119,7 @@ func (client *Client) Register( } // Go to the No Server state with the saved servers after we're done - defer client.FSM.GoTransitionWithData(STATE_NO_SERVER, client.Servers, true) + defer client.FSM.GoTransitionWithData(STATE_NO_SERVER, client.Servers) // Let's Connect! doesn't care about discovery if client.isLetsConnect() { @@ -160,7 +160,7 @@ func (client *Client) askProfile(chosenServer server.Server) error { if profilesErr != nil { return types.NewWrappedError("failed asking for profiles", profilesErr) } - client.FSM.GoTransitionWithData(STATE_ASK_PROFILE, profiles, false) + client.FSM.GoTransitionWithData(STATE_ASK_PROFILE, profiles) return nil } |
