diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-20 20:09:09 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-20 21:14:12 +0900 |
commit | 59c4996a602e9eeae4e3bfc0210ff15f957df38f (patch) | |
tree | 82eee6137623bafbbe160844c5d9c57c4daf3621 /lib/room.cpp | |
parent | ad159b5206de615762e22f95e97ae61400f11761 (diff) | |
download | libquotient-59c4996a602e9eeae4e3bfc0210ff15f957df38f.tar.gz libquotient-59c4996a602e9eeae4e3bfc0210ff15f957df38f.zip |
BaseJob/ConnectionData: connection-wide rate-limiting
As before, completely transparent for clients, driven by 529 errors from
the server (but cases of rate limiting are signalled by
BaseJob::rateLimited). That brings changes to BaseJob API: timeouts now
use int64_t and also can be handled in std::chrono terms; aboutToStart()
-> aboutToSendRequest(); started() -> sentRequest(). Closes #292.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 2e2f73c4..b0829252 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1440,7 +1440,7 @@ QString Room::Private::doSendEvent(const RoomEvent* pEvent) connection->callApi<SendMessageJob>(BackgroundRequest, id, pEvent->matrixType(), txnId, pEvent->contentJson())) { - Room::connect(call, &BaseJob::started, q, [this, txnId] { + Room::connect(call, &BaseJob::sentRequest, q, [this, txnId] { auto it = q->findPendingEvent(txnId); if (it == unsyncedEvents.end()) { qWarning(EVENTS) << "Pending event for transaction" << txnId |