Merge pull request #22129 from taosdata/fix/TD-25300

fix:[TD-25300]dead loop if getchar return EOF in arm64
This commit is contained in:
Haojun Liao 2023-07-21 16:35:05 +08:00 committed by GitHub
commit f2a969ca23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -307,9 +307,6 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t sversion, char* msg, int32_t
} else if (pOffset->val.type == TMQ_OFFSET__LOG) {
tqInfo("receive offset commit msg to %s on vgId:%d, offset(type:log) version:%" PRId64, pOffset->subKey, vgId,
pOffset->val.version);
if (pOffset->val.version + 1 == sversion) {
pOffset->val.version += 1;
}
} else {
tqError("invalid commit offset type:%d", pOffset->val.type);
return -1;

View File

@ -501,7 +501,7 @@ int32_t shellReadCommand(char *command) {
while (1) {
c = taosGetConsoleChar();
if (c == EOF) {
if (c == (char)EOF) {
return c;
}