summaryrefslogtreecommitdiff
path: root/client/fsm.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-25 11:44:04 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-25 11:44:04 +0200
commitb4be281671ecfe5c1e6f831614ca1dde48522cd7 (patch)
tree60607908ae545d32aabc08d86d22444003744d65 /client/fsm.go
parentc9603e4a2ec682ca30399205ccbf533f55230ad4 (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/fsm.go')
-rw-r--r--client/fsm.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/fsm.go b/client/fsm.go
index a1d82f7..767ceaa 100644
--- a/client/fsm.go
+++ b/client/fsm.go
@@ -292,7 +292,7 @@ func (client *Client) SetConnected() error {
return client.handleError(errorMessage, currentServerErr)
}
- client.FSM.GoTransitionWithData(STATE_CONNECTED, currentServer, false)
+ client.FSM.GoTransitionWithData(STATE_CONNECTED, currentServer)
return nil
}
@@ -321,7 +321,7 @@ func (client *Client) SetConnecting() error {
return client.handleError(errorMessage, currentServerErr)
}
- client.FSM.GoTransitionWithData(STATE_CONNECTING, currentServer, false)
+ client.FSM.GoTransitionWithData(STATE_CONNECTING, currentServer)
return nil
}
@@ -350,7 +350,7 @@ func (client *Client) SetDisconnecting() error {
return client.handleError(errorMessage, currentServerErr)
}
- client.FSM.GoTransitionWithData(STATE_DISCONNECTING, currentServer, false)
+ client.FSM.GoTransitionWithData(STATE_DISCONNECTING, currentServer)
return nil
}
@@ -385,7 +385,7 @@ func (client *Client) SetDisconnected(cleanup bool) error {
server.Disconnect(currentServer)
}
- client.FSM.GoTransitionWithData(STATE_DISCONNECTED, currentServer, false)
+ client.FSM.GoTransitionWithData(STATE_DISCONNECTED, currentServer)
return nil
}
@@ -414,7 +414,7 @@ func (client *Client) GoBack() error {
}
// FIXME: Abitrary back transitions don't work because we need the approriate data
- client.FSM.GoTransitionWithData(STATE_NO_SERVER, client.Servers, false)
+ client.FSM.GoTransitionWithData(STATE_NO_SERVER, client.Servers)
return nil
}