naggie / megafilter

2013: Single-user Google RSS Reader alternative, with RESTful API
http://callanbryant.co.uk/#Blog/introducing_megafilter.md
Apache License 2.0
60 stars 6 forks source link

Strange behavior: article not loaded, says 0 then number #67

Closed naggie closed 11 years ago

naggie commented 11 years ago

Loading /current returns a blank 404 page in this condition.

Headers:

HTTP/1.1 404 Not Found
WWW-Authenticate: Basic realm="Megafilter"
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Wed, 01 May 2013 10:42:11 GMT
Connection: keep-alive
Transfer-Encoding: chunked

This is not a caching issue as the previous workaround suggested. maybe the Queue pointer is screwed up?

I think it might be caused by enqueue or delete when the pointer is at the beginning or end...?

naggie commented 11 years ago

When this happens, index is NaN (which is normally because of 0/0)

naggie commented 11 years ago

Might be the discard() method.

If the ID is not found (discard fails, for whatever reason) then it still changes the index

naggie commented 11 years ago

index.length should have been articles.length