Merge pull request #110 from frew/master

FileLogFetcher's fetch() method should fix up position and origin even i...
This commit is contained in:
agapple
2015-01-30 20:54:22 +08:00

View File

@@ -129,11 +129,11 @@ public final class FileLogFetcher extends LogFetcher {
} }
} else if (limit > 0) { } else if (limit > 0) {
System.arraycopy(buffer, origin, buffer, 0, limit); System.arraycopy(buffer, origin, buffer, 0, limit);
position -= origin;
origin = 0;
final int len = fin.read(buffer, limit, buffer.length - limit); final int len = fin.read(buffer, limit, buffer.length - limit);
if (len >= 0) { if (len >= 0) {
limit += len; limit += len;
position -= origin;
origin = 0;
/* More binlog to fetch */ /* More binlog to fetch */
return true; return true;