Fix bugs in Changes.readNextRow(). Previously it was possible for readNextRow() to hang indefinitely for continuous changes feeds.
How
Exit the while loop early if the line we read from the stream was null or contains {"last_seq":.
In theory row should never be null because the stream should block if there is no more data or
send "last_seq" when we get to the end. However, it's a case worth handling so that the loop still
exits even if "last_seq" isn't set.
What
Fix bugs in
Changes.readNextRow()
. Previously it was possible forreadNextRow()
to hang indefinitely for continuous changes feeds.How
Exit the while loop early if the line we read from the stream was null or contains
{"last_seq":
.In theory
row
should never be null because the stream should block if there is no more data or send "last_seq" when we get to the end. However, it's a case worth handling so that the loop still exits even if "last_seq" isn't set.Testing
Added mock server test
changesFeedLastSeq
.Issues
Fixes #390.