diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-29 23:04:44 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-29 23:04:44 +0100 |
| commit | 8b183eea3238cc2f25cf62e63d724a2d2d361ee7 (patch) | |
| tree | 75a50d6f83e306e539c83e4d4403f4f2217f70af /src | |
| parent | eb75d656970d2195ff03f7d1bb57db959249cb96 (diff) | |
Fix hang in client_server tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/server.cc | 8 | ||||
| -rw-r--r-- | src/lib/server.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc index 1fb3d7d47..722b1c811 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -40,7 +40,7 @@ Server::~Server () } _acceptor.close (); - _io_service.stop (); + stop (); } void @@ -74,3 +74,9 @@ Server::handle_accept (shared_ptr<Socket> socket, boost::system::error_code cons handle (socket); start_accept (); } + +void +Server::stop () +{ + _io_service.stop (); +} diff --git a/src/lib/server.h b/src/lib/server.h index a72d36026..747c516a2 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -35,6 +35,7 @@ public: virtual ~Server (); virtual void run (); + void stop (); protected: boost::mutex _mutex; |
