fix stdin bug returning eof in input loop

master
Andre Puschmann 7 years ago
parent 13b53c4518
commit 44e9a5bd11

@ -403,6 +403,10 @@ void *input_loop(void *m) {
char key; char key;
while (running) { while (running) {
cin >> key; cin >> key;
if (cin.eof() || cin.bad()) {
cout << "Closing stdin thread\n" << endl;
break;
} else {
if ('t' == key) { if ('t' == key) {
do_metrics = !do_metrics; do_metrics = !do_metrics;
if (do_metrics) { if (do_metrics) {
@ -413,6 +417,7 @@ void *input_loop(void *m) {
metrics_screen.toggle_print(do_metrics); metrics_screen.toggle_print(do_metrics);
} }
} }
}
return NULL; return NULL;
} }

Loading…
Cancel
Save