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:
commit
f2a969ca23
|
@ -307,9 +307,6 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t sversion, char* msg, int32_t
|
||||||
} else if (pOffset->val.type == TMQ_OFFSET__LOG) {
|
} 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,
|
tqInfo("receive offset commit msg to %s on vgId:%d, offset(type:log) version:%" PRId64, pOffset->subKey, vgId,
|
||||||
pOffset->val.version);
|
pOffset->val.version);
|
||||||
if (pOffset->val.version + 1 == sversion) {
|
|
||||||
pOffset->val.version += 1;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
tqError("invalid commit offset type:%d", pOffset->val.type);
|
tqError("invalid commit offset type:%d", pOffset->val.type);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -501,7 +501,7 @@ int32_t shellReadCommand(char *command) {
|
||||||
while (1) {
|
while (1) {
|
||||||
c = taosGetConsoleChar();
|
c = taosGetConsoleChar();
|
||||||
|
|
||||||
if (c == EOF) {
|
if (c == (char)EOF) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue