make client_test more robust in exiting if stdin is closed by caller
This commit is contained in:
parent
778b132790
commit
3c29f6750a
@ -1356,7 +1356,11 @@ example alert_masks:
|
||||
|
||||
torrent_handle h = view.get_active_handle();
|
||||
|
||||
if (c == EOF) { break; }
|
||||
if (c == EOF)
|
||||
{
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
do
|
||||
{
|
||||
if (c == escape_seq)
|
||||
@ -1366,11 +1370,19 @@ example alert_masks:
|
||||
int c2 = _getch();
|
||||
#else
|
||||
int c2 = getc(stdin);
|
||||
if (c2 == EOF) { break; }
|
||||
if (c2 == EOF)
|
||||
{
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
if (c2 != '[') continue;
|
||||
c2 = getc(stdin);
|
||||
#endif
|
||||
if (c2 == EOF) break;
|
||||
if (c2 == EOF)
|
||||
{
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
if (c2 == left_arrow)
|
||||
{
|
||||
int const filter = view.filter();
|
||||
|
Loading…
x
Reference in New Issue
Block a user