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 (#2904)
  • Loading branch information
cheniujh authored Oct 14, 2024
1 parent 05f3935 commit 6d4c9ca
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 6d4c9ca

Please sign in to comment.