Skip to content

Commit d5c89cd

Browse files
wendanikcudnik
authored andcommitted
Fix typo (sonic-net#467)
* Rename to fix typo Signed-off-by: Wenda Ni <wenni@microsoft.com> * Correct shared_ptr creation parameters Signed-off-by: Wenda Ni <wenni@microsoft.com>
1 parent be5d002 commit d5c89cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/src/sai_redis_interfacequery.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ bool g_apiInitialized = false;
1111
volatile bool g_run = false;
1212

1313
// this event is used to nice end notifications thread
14-
swss::SelectableEvent g_redisNotificationTrheadEvent;
14+
swss::SelectableEvent g_redisNotificationThreadEvent;
1515
std::shared_ptr<std::thread> notification_thread;
1616

1717
std::shared_ptr<swss::DBConnector> g_db;
@@ -61,15 +61,15 @@ void ntf_thread()
6161
swss::Select s;
6262

6363
s.addSelectable(g_redisNotifications.get());
64-
s.addSelectable(&g_redisNotificationTrheadEvent);
64+
s.addSelectable(&g_redisNotificationThreadEvent);
6565

6666
while (g_run)
6767
{
6868
swss::Selectable *sel;
6969

7070
int result = s.select(&sel);
7171

72-
if (sel == &g_redisNotificationTrheadEvent)
72+
if (sel == &g_redisNotificationThreadEvent)
7373
{
7474
// user requested shutdown_switch
7575
break;
@@ -136,7 +136,7 @@ sai_status_t sai_api_initialize(
136136

137137
SWSS_LOG_DEBUG("creating notification thread");
138138

139-
notification_thread = std::make_shared<std::thread>(std::thread(ntf_thread));
139+
notification_thread = std::make_shared<std::thread>(ntf_thread);
140140

141141
g_apiInitialized = true;
142142

@@ -161,7 +161,7 @@ sai_status_t sai_api_uninitialize(void)
161161
g_run = false;
162162

163163
// notify thread that it should end
164-
g_redisNotificationTrheadEvent.notify();
164+
g_redisNotificationThreadEvent.notify();
165165

166166
notification_thread->join();
167167

0 commit comments

Comments
 (0)