mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 16:33:53 +01:00
modules/federation: Fix conf item shared between invite and invite2.
This commit is contained in:
parent
baadb3d44a
commit
0be0fe9e82
2 changed files with 6 additions and 7 deletions
|
@ -52,6 +52,7 @@ method_put
|
||||||
};
|
};
|
||||||
|
|
||||||
conf::item<milliseconds>
|
conf::item<milliseconds>
|
||||||
|
IRCD_MODULE_EXPORT_DATA
|
||||||
stream_cross_sleeptime
|
stream_cross_sleeptime
|
||||||
{
|
{
|
||||||
{ "name", "ircd.federation.invite.stream_cross_sleeptime" },
|
{ "name", "ircd.federation.invite.stream_cross_sleeptime" },
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
|
|
||||||
using namespace ircd;
|
using namespace ircd;
|
||||||
|
|
||||||
|
// federation_invite (weak)
|
||||||
|
extern conf::item<milliseconds>
|
||||||
|
stream_cross_sleeptime;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
process(client &,
|
process(client &,
|
||||||
const m::resource::request &,
|
const m::resource::request &,
|
||||||
|
@ -44,12 +48,6 @@ method_put
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mods::import<conf::item<milliseconds>>
|
|
||||||
stream_cross_sleeptime
|
|
||||||
{
|
|
||||||
"federation_invite", "stream_cross_sleeptime"
|
|
||||||
};
|
|
||||||
|
|
||||||
m::resource::response
|
m::resource::response
|
||||||
put__invite(client &client,
|
put__invite(client &client,
|
||||||
const m::resource::request &request)
|
const m::resource::request &request)
|
||||||
|
@ -211,7 +209,7 @@ put__invite(client &client,
|
||||||
|
|
||||||
// Synapse needs time to process our response otherwise our eval below may
|
// Synapse needs time to process our response otherwise our eval below may
|
||||||
// complete before this response arrives for them and is processed.
|
// complete before this response arrives for them and is processed.
|
||||||
ctx::sleep(milliseconds(*stream_cross_sleeptime));
|
ctx::sleep(milliseconds(stream_cross_sleeptime));
|
||||||
|
|
||||||
// Post processing, does not throw.
|
// Post processing, does not throw.
|
||||||
process(client, request, signed_event);
|
process(client, request, signed_event);
|
||||||
|
|
Loading…
Reference in a new issue