@@ -26,16 +26,16 @@ import (
26
26
)
27
27
28
28
const (
29
- EventHeartbeats = "tailnet_coordinator_heartbeat"
30
- eventClientUpdate = "tailnet_client_update"
31
- eventClientSubscription = "tailnet_client_subscription_update "
32
- eventAgentUpdate = "tailnet_agent_update"
33
- HeartbeatPeriod = time . Second * 2
34
- MissedHeartbeats = 3
35
- numQuerierWorkers = 10
36
- numBinderWorkers = 10
37
- dbMaxBackoff = 10 * time .Second
38
- cleanupPeriod = time .Hour
29
+ EventHeartbeats = "tailnet_coordinator_heartbeat"
30
+ eventClientUpdate = "tailnet_client_update"
31
+ eventAgentUpdate = "tailnet_agent_update "
32
+ HeartbeatPeriod = time . Second * 2
33
+ MissedHeartbeats = 3
34
+ numQuerierWorkers = 10
35
+ numBinderWorkers = 10
36
+ numSubscriberWorkers = 10
37
+ dbMaxBackoff = 10 * time .Second
38
+ cleanupPeriod = time .Hour
39
39
)
40
40
41
41
// TODO: add subscriber to this graphic
@@ -240,10 +240,8 @@ func (c *pgCoord) ServeClient(conn net.Conn, id uuid.UUID, agent uuid.UUID) erro
240
240
slog .Error (err ))
241
241
}
242
242
}()
243
- cIO , err := newConnIO (c .ctx , c .logger , c .bindings , conn , id , id .String (), agpl .QueueKindClient )
244
- if err != nil {
245
- return err
246
- }
243
+
244
+ cIO := newConnIO (c .ctx , c .logger , c .bindings , conn , id , id .String (), agpl .QueueKindClient )
247
245
if err := sendCtx (c .ctx , c .newConnections , agpl .Queue (cIO )); err != nil {
248
246
// can only be a context error, no need to log here.
249
247
return err
@@ -277,10 +275,7 @@ func (c *pgCoord) ServeAgent(conn net.Conn, id uuid.UUID, name string) error {
277
275
}
278
276
}()
279
277
logger := c .logger .With (slog .F ("name" , name ))
280
- cIO , err := newConnIO (c .ctx , logger , c .bindings , conn , id , name , agpl .QueueKindAgent )
281
- if err != nil {
282
- return err
283
- }
278
+ cIO := newConnIO (c .ctx , logger , c .bindings , conn , id , name , agpl .QueueKindAgent )
284
279
if err := sendCtx (c .ctx , c .newConnections , agpl .Queue (cIO )); err != nil {
285
280
// can only be a context error, no need to log here.
286
281
return err
@@ -349,7 +344,7 @@ func newSubscriber(ctx context.Context,
349
344
go s .handleSubscriptions ()
350
345
go func () {
351
346
<- startWorkers
352
- for i := 0 ; i < numBinderWorkers ; i ++ {
347
+ for i := 0 ; i < numSubscriberWorkers ; i ++ {
353
348
go s .worker ()
354
349
}
355
350
}()
0 commit comments