summaryrefslogtreecommitdiff
path: root/internal/clients/connectors/serverconnection.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/clients/connectors/serverconnection.go')
-rw-r--r--internal/clients/connectors/serverconnection.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/clients/connectors/serverconnection.go b/internal/clients/connectors/serverconnection.go
index fbeb1bc..649fe30 100644
--- a/internal/clients/connectors/serverconnection.go
+++ b/internal/clients/connectors/serverconnection.go
@@ -224,18 +224,19 @@ func (c *ServerConnection) handle(ctx context.Context, cancel context.CancelFunc
}
}()
- // Send all commands to client.
+ if c.authKeyDisabled {
+ dlog.Client.Debug(c.server, "Skipping AUTHKEY registration because auth-key is disabled")
+ } else {
+ c.sendAuthKeyRegistrationCommand()
+ }
+
+ // Send all requested commands to the server.
for _, command := range c.commands {
dlog.Client.Debug(command)
if err := c.handler.SendMessage(command); err != nil {
dlog.Client.Debug(err)
}
}
- if c.authKeyDisabled {
- dlog.Client.Debug(c.server, "Skipping AUTHKEY registration because auth-key is disabled")
- } else {
- c.sendAuthKeyRegistrationCommand()
- }
if !c.throttlingDone {
dlog.Client.Debug(c.server, "Unthrottling connection (2)",