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 timer := time.NewTimer(syncReq.timeout) // case of timeout=0 is handled above
defer timer.Stop() defer timer.Stop()
userStream := rp.notifier.GetListener(*syncReq) userStreamListener := rp.notifier.GetListener(*syncReq)
defer userStream.Close() defer userStreamListener.Close()
for { for {
select { select {
// Wait for notifier to wake us up // Wait for notifier to wake us up
case <-userStream.GetNotifyChannel(currPos): case <-userStreamListener.GetNotifyChannel(currPos):
currPos = userStream.GetStreamPosition() currPos = userStreamListener.GetStreamPosition()
// Or for timeout to expire // Or for timeout to expire
case <-timer.C: case <-timer.C:
return util.JSONResponse{ return util.JSONResponse{