Rename var

This commit is contained in:
Erik Johnston 2017-10-24 11:06:30 +01:00
parent a1118b01ce
commit 6396edf1a4

View file

@ -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{