Skip to content

Commit 99283e0

Browse files
author
Bret Ambrose
committed
Final update
1 parent 9d8b3ce commit 99283e0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/Mqtt5ClientTest.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,11 +2455,15 @@ static int s_TestMqtt5to3AdapterWSConnectionMinimalThroughMqtt3(Aws::Crt::Alloca
24552455
Mqtt::MqttConnection::NewConnectionFromMqtt5Client(mqtt5Client);
24562456
ASSERT_TRUE(mqttConnection);
24572457

2458-
mqttConnection->WebsocketInterceptor = [&config, &mqtt311Signing](
2459-
std::shared_ptr<Aws::Crt::Http::HttpRequest> req,
2458+
mqttConnection->WebsocketInterceptor = [&](std::shared_ptr<Aws::Crt::Http::HttpRequest> req,
24602459
const Aws::Crt::Mqtt::OnWebSocketHandshakeInterceptComplete &onComplete)
24612460
{
2462-
onComplete(req, AWS_ERROR_SUCCESS);
2461+
auto signingComplete = [onComplete](const std::shared_ptr<Aws::Crt::Http::HttpRequest> &req1, int errorCode)
2462+
{ onComplete(req1, errorCode); };
2463+
2464+
auto signerConfig = config.CreateSigningConfigCb();
2465+
2466+
config.Signer->SignRequest(req, *signerConfig, signingComplete);
24632467
mqtt311Signing.set_value();
24642468
};
24652469

0 commit comments

Comments
 (0)