From ad5328c453e7fb662f2f17e54cb30c5bb348f817 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 7 Apr 2017 17:08:59 +0100 Subject: [PATCH] Add notes --- .../matrix-org/dendrite/clientapi/sync/requestpool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/sync/requestpool.go b/src/github.com/matrix-org/dendrite/clientapi/sync/requestpool.go index 3f18596cb..8fd610cf0 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/sync/requestpool.go +++ b/src/github.com/matrix-org/dendrite/clientapi/sync/requestpool.go @@ -74,7 +74,6 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request) util.JSONRespons "userID": userID, "since": since, "timeout": timeout, - "current": rp.currPos, }).Info("Incoming /sync request") // Set up a timer based on the provided timeout value. @@ -94,6 +93,9 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request) util.JSONRespons } }() + // TODO: Spawn off a 3rd goroutine to do this work so we can simply race + // with the timeout to determine what to return to the client. + res, err := rp.currentSyncForUser(syncReq) close(done) // signal that the work is complete if err != nil {