Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Jun 25, 2020
1 parent 8dd2c45 commit 454f88f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/HubConnectionSample/HubConnectionSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class logger : public signalr::log_writer
}
};

void send_message(signalr::hub_connection& connection, const std::string& message)
void send_message(std::shared_ptr<signalr::hub_connection> connection, const std::string& message)
{
std::vector<signalr::value> arr { std::string("c++"), message };
signalr::value args(arr);

// if you get an internal compiler error uncomment the lambda below or install VS Update 4
connection.invoke("Send", args, [](const signalr::value& value, std::exception_ptr exception)
connection->invoke("Send", args, [](const signalr::value& value, std::exception_ptr exception)
{
try
{
Expand Down Expand Up @@ -88,7 +88,7 @@ void chat()
break;
}

//send_message(connection, message);
send_message(connection, message);
}

connection->stop([&task](std::exception_ptr exception)
Expand Down

0 comments on commit 454f88f

Please sign in to comment.