mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Rename var
This commit is contained in:
parent
a1118b01ce
commit
6396edf1a4
|
|
@ -82,14 +82,14 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtype
|
|||
timer := time.NewTimer(syncReq.timeout) // case of timeout=0 is handled above
|
||||
defer timer.Stop()
|
||||
|
||||
userStream := rp.notifier.GetListener(*syncReq)
|
||||
defer userStream.Close()
|
||||
userStreamListener := rp.notifier.GetListener(*syncReq)
|
||||
defer userStreamListener.Close()
|
||||
|
||||
for {
|
||||
select {
|
||||
// Wait for notifier to wake us up
|
||||
case <-userStream.GetNotifyChannel(currPos):
|
||||
currPos = userStream.GetStreamPosition()
|
||||
case <-userStreamListener.GetNotifyChannel(currPos):
|
||||
currPos = userStreamListener.GetStreamPosition()
|
||||
// Or for timeout to expire
|
||||
case <-timer.C:
|
||||
return util.JSONResponse{
|
||||
|
|
|
|||
Loading…
Reference in a new issue