There was an error while loading. Please reload this page.
1 parent 8c9511e commit d62a933Copy full SHA for d62a933
example/local_echo_demo.cpp
@@ -134,7 +134,7 @@ int main() {
134
// get std::string from user
135
// send string data over network connection
136
std::string s;
137
- while (s != "quit\n") {
+ while (s != "quit\n" && std::cin.good()) {
138
std::cout << "> ";
139
std::getline (std::cin, s);
140
s += "\n"; // needed for deliminator
0 commit comments