Example #1
0
func (s *Session) handleBatchResponse(cursor *Cursor, response *p.Response) {
	cursor.extend(response)

	s.Lock()
	cursor.outstandingRequests -= 1

	if response.GetType() != p.Response_SUCCESS_PARTIAL &&
		response.GetType() != p.Response_SUCCESS_FEED &&
		cursor.outstandingRequests == 0 {
		delete(s.cache, response.GetToken())
	}
	s.Unlock()
}