Skip to content

Commit

Permalink
move declare position of in_conn to avoid unnecessary extra Ref from …
Browse files Browse the repository at this point in the history
…shared_ptr
  • Loading branch information
cheniujh committed Sep 20, 2024
1 parent b2bde42 commit 1186231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/src/worker_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void* WorkerThread::ThreadMain() {
NetFiredEvent* pfe = nullptr;
char bb[2048];
NetItem ti;
std::shared_ptr<NetConn> in_conn = nullptr;


struct timeval when;
gettimeofday(&when, nullptr);
Expand Down Expand Up @@ -155,7 +155,7 @@ void* WorkerThread::ThreadMain() {
continue;
}
} else {
in_conn = nullptr;
std::shared_ptr<NetConn> in_conn = nullptr;
int should_close = 0;

{
Expand Down

0 comments on commit 1186231

Please sign in to comment.