Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf19076c

Browse files
authored
chore: fix coordinator flake by moving pubsub below register (#6482)
After making the in-memory pubsub conform to the expectations ofPostgreSQL, this flake started appearing.This fixes it because the agent socket is registered when a messageis received.
1 parentef2e86f commitf19076c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎enterprise/tailnet/coordinator.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ func (c *haCoordinator) handleNextClientMessage(id, agent uuid.UUID, decoder *js
197197
func (c*haCoordinator)ServeAgent(conn net.Conn,id uuid.UUID,namestring)error {
198198
c.agentNameCache.Add(id,name)
199199

200-
// Tell clients on other instances to send a callmemaybe to us.
201-
err:=c.publishAgentHello(id)
202-
iferr!=nil {
203-
returnxerrors.Errorf("publish agent hello: %w",err)
204-
}
205-
206200
// Publish all nodes on this instance that want to connect to this agent.
207201
nodes:=c.nodesSubscribedToAgent(id)
208202
iflen(nodes)>0 {
@@ -241,6 +235,12 @@ func (c *haCoordinator) ServeAgent(conn net.Conn, id uuid.UUID, name string) err
241235
}
242236
c.mutex.Unlock()
243237

238+
// Tell clients on other instances to send a callmemaybe to us.
239+
err:=c.publishAgentHello(id)
240+
iferr!=nil {
241+
returnxerrors.Errorf("publish agent hello: %w",err)
242+
}
243+
244244
deferfunc() {
245245
c.mutex.Lock()
246246
deferc.mutex.Unlock()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp