2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-19 14:22:23 +00:00

some fixes

This commit is contained in:
Oliver Kowalke
2014-09-24 19:18:44 +02:00
parent 244c539a2e
commit 7fb469cd10
39 changed files with 728 additions and 1139 deletions

View File

@@ -194,6 +194,7 @@ public:
cond_.wait( lk);
std::string data( data_);
lk.unlock();
std::cout << "subscriber::run(): '" << data << std::endl;
// message '<fini>' terminates subscription
if ( "<fini>" == data) break;
@@ -206,7 +207,11 @@ public:
socket_,
boost::asio::buffer( data, data.size() ),
yield[ec]);
if ( ec) throw std::runtime_error("publishing message failed");
if ( ec == boost::asio::error::eof)
break; //connection closed cleanly by peer
else if ( ec)
throw boost::system::system_error( ec); //some other error
std::cout << "subscriber::run(): '" << data << " written" << std::endl;
}
}
catch ( std::exception const& e)