Skip to content

Commit 983eeaf

Browse files
committed
Merge branch 'sprint/24Q4' of https://github.com/madanagopalt/rdkservices into sprint/24Q4
2 parents cae0d65 + ca9f89f commit 983eeaf

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

AppManager/WebSocket.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,46 +148,46 @@ namespace Plugin {
148148
return it->second->getIdentifier();
149149
}
150150
}
151-
websocketpp::lib::error_code ec;
151+
websocketpp::lib::error_code errorCode;
152152

153-
WebSocketAsioClient::connection_ptr con = mEndPoint.get_connection(uri, ec);
153+
WebSocketAsioClient::connection_ptr clientConnection = mEndPoint.get_connection(uri, errorCode);
154154
std::cout << "NEW CONNECTION FOR " << uri << std::endl;
155-
if (ec)
155+
if (errorCode)
156156
{
157-
std::cout << "> Connect initialization error: " << ec.message() << std::endl;
157+
std::cout << "Failed to initialize connection. error: " << errorCode.message() << std::endl;
158158
return -1;
159159
}
160160

161161
int newId = mNextIdentifier++;
162-
ConnectionMetaData::sharedPtr metaDataReference = websocketpp::lib::make_shared<ConnectionMetaData>(newId, con->get_handle(), uri);
162+
ConnectionMetaData::sharedPtr metaDataReference = websocketpp::lib::make_shared<ConnectionMetaData>(newId, clientConnection->get_handle(), uri);
163163
mConnectionList[newId] = metaDataReference;
164164

165-
con->set_open_handler(websocketpp::lib::bind(
165+
clientConnection->set_open_handler(websocketpp::lib::bind(
166166
&ConnectionMetaData::onOpen,
167167
metaDataReference,
168168
&mEndPoint,
169169
websocketpp::lib::placeholders::_1
170170
));
171-
con->set_fail_handler(websocketpp::lib::bind(
171+
clientConnection->set_fail_handler(websocketpp::lib::bind(
172172
&ConnectionMetaData::onFail,
173173
metaDataReference,
174174
&mEndPoint,
175175
websocketpp::lib::placeholders::_1
176176
));
177-
con->set_close_handler(websocketpp::lib::bind(
177+
clientConnection->set_close_handler(websocketpp::lib::bind(
178178
&ConnectionMetaData::onClose,
179179
metaDataReference,
180180
&mEndPoint,
181181
websocketpp::lib::placeholders::_1
182182
));
183-
con->set_message_handler(websocketpp::lib::bind(
183+
clientConnection->set_message_handler(websocketpp::lib::bind(
184184
&ConnectionMetaData::onMessage,
185185
metaDataReference,
186186
websocketpp::lib::placeholders::_1,
187187
websocketpp::lib::placeholders::_2
188188
));
189189

190-
mEndPoint.connect(con);
190+
mEndPoint.connect(clientConnection);
191191
if (wait)
192192
{
193193
metaDataReference->waitForEvent();

0 commit comments

Comments
 (0)