Skip to content

Commit

Permalink
Fix hang in simplewallet when no correct input is given.
Browse files Browse the repository at this point in the history
Simplewallet hangs (loop forever with failure) when input is "ended"
(e.g. CTRL-Z or CTRL-D depending on platform). Also, can happen with
pipes/redirects.

	modified:   contrib/epee/include/console_handler.h
  • Loading branch information
chinarulezzz committed Nov 1, 2017
1 parent 2c6f125 commit 612ed01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/epee/include/console_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ namespace epee
if(!m_stdin_reader.get_line(command))
{
LOG_PRINT("Failed to read line.", LOG_LEVEL_0);
std::cin.clear();
continue;
}
string_tools::trim(command);

Expand Down

0 comments on commit 612ed01

Please sign in to comment.