Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2017-07-26 10:49:23 +0300
committereidheim <eidheim@gmail.com>2017-07-26 10:49:23 +0300
commit9a8d9e5a6b57dc7d76277a1eae1333047b52ed3f (patch)
tree2c11d3a5a8b74134cde0ea58c79754b547f9edbf /tests
parent1edf27467727b4fdab5c278d3cceda2b16c1403b (diff)
Handlers are now cancelled when server/client is destructed. Useful when using an external io_service.
Diffstat (limited to 'tests')
-rw-r--r--tests/parse_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/parse_test.cpp b/tests/parse_test.cpp
index 6689773..9295ed1 100644
--- a/tests/parse_test.cpp
+++ b/tests/parse_test.cpp
@@ -13,7 +13,7 @@ public:
void accept() {}
void parse_request_test() {
- std::shared_ptr<Connection> connection(new Connection(0, *io_service));
+ std::shared_ptr<Connection> connection(new Connection(handler_runner, 0, *io_service));
ostream ss(&connection->read_buffer);
ss << "GET /test/ HTTP/1.1\r\n";
@@ -82,7 +82,7 @@ public:
}
void parse_response_header_test() {
- auto connection = std::shared_ptr<Connection>(new Connection(*io_service));
+ auto connection = std::shared_ptr<Connection>(new Connection(handler_runner, *io_service));
connection->message = std::shared_ptr<Message>(new Message());
ostream stream(&connection->message->streambuf);