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 {