mirror of https://github.com/PentHertz/srsLTE.git
fix stdin bug returning eof in input loop
This commit is contained in:
parent
13b53c4518
commit
44e9a5bd11
|
@ -403,6 +403,10 @@ void *input_loop(void *m) {
|
|||
char key;
|
||||
while (running) {
|
||||
cin >> key;
|
||||
if (cin.eof() || cin.bad()) {
|
||||
cout << "Closing stdin thread\n" << endl;
|
||||
break;
|
||||
} else {
|
||||
if ('t' == key) {
|
||||
do_metrics = !do_metrics;
|
||||
if (do_metrics) {
|
||||
|
@ -413,6 +417,7 @@ void *input_loop(void *m) {
|
|||
metrics_screen.toggle_print(do_metrics);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue