Skip to content

Instantly share code, notes, and snippets.

@ivan-tkatchev
Created July 2, 2015 12:54
Show Gist options
  • Save ivan-tkatchev/a2b150e6df6b66f63d05 to your computer and use it in GitHub Desktop.
Save ivan-tkatchev/a2b150e6df6b66f63d05 to your computer and use it in GitHub Desktop.
diff --git a/server.cpp b/server.cpp
index ccb051f..328e5e6 100644
--- a/server.cpp
+++ b/server.cpp
@@ -16,8 +16,11 @@ struct service_thread
try
{
- s >> b;
- s << "bar";
+ while (true) {
+ s >> b;
+ s << "bar";
+ }
+ } catch (eof_exception& e) {
} catch (std::exception& e)
{
std::cerr << "SERVER ERR: " << e.what() << std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment