Check the return of get_connection, raise an appropriate error if it failed.

This commit is contained in:
Walter Gray committed 2016-05-19 16:00:20 -07:00
1 parent 5f42305bbd
commit ebd0afd67d
1 file changed
+5
+5
View File
@@ -127,6 +127,11 @@ public:
ec = lib::error_code();
connection_ptr con = get_connection();
if (!con) {
ec = error::make_error_code(error::con_creation_failed);
return;
}
transport_type::async_accept(
lib::static_pointer_cast<transport_con_type>(con),
lib::bind(&type::handle_accept,this,con,lib::placeholders::_1),