mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Yggdrasil demo updates (#1241)
* PerformServersAlive in PerformBroadcastEDU * Don't double-pointer * More reliable QUIC session handling * Direct peer lookup, other tweaks * Tweaks * Try to wake up queues on incoming QUIC session * Set session callbak on gobind build * Fix incoming session storage * Stateless reset, other tweaks * Reset sessions when coordinates change * Disable HTTP connection reuse, tweak timeouts
This commit is contained in:
parent
642f9cb964
commit
b7491aae03
8 changed files with 271 additions and 89 deletions
|
@ -319,6 +319,11 @@ func (r *FederationSenderInternalAPI) PerformBroadcastEDU(
|
|||
if err != nil {
|
||||
return fmt.Errorf("r.db.GetAllJoinedHosts: %w", err)
|
||||
}
|
||||
if len(destinations) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
logrus.WithContext(ctx).Infof("Sending wake-up EDU to %d destination(s)", len(destinations))
|
||||
|
||||
edu := &gomatrixserverlib.EDU{
|
||||
Type: "org.matrix.dendrite.wakeup",
|
||||
|
@ -328,5 +333,13 @@ func (r *FederationSenderInternalAPI) PerformBroadcastEDU(
|
|||
return fmt.Errorf("r.queues.SendEDU: %w", err)
|
||||
}
|
||||
|
||||
wakeReq := &api.PerformServersAliveRequest{
|
||||
Servers: destinations,
|
||||
}
|
||||
wakeRes := &api.PerformServersAliveResponse{}
|
||||
if err := r.PerformServersAlive(ctx, wakeReq, wakeRes); err != nil {
|
||||
return fmt.Errorf("r.PerformServersAlive: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue