Skip to content

Commit

Permalink
asdasd
Browse files Browse the repository at this point in the history
  • Loading branch information
WtzLAS committed Dec 22, 2023
1 parent 0ba3bb9 commit 460eb72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NorthstarDLL/shared/kcpintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ void updateThreadPayload(std::stop_token stoken, KcpLayer* layer)
{
std::unique_lock<std::mutex> lk1(layer->cbMutex);
ikcp_update(layer->cb, iclock());
NetGraphSink::instance()->localStat.sync(layer->cb);
auto current = iclock();
auto next = ikcp_check(layer->cb, current);
duration = itimediff(next, current);
Expand Down Expand Up @@ -1017,6 +1018,7 @@ int KcpLayer::sendto(NetBuffer&& buf, const NetContext& ctx, const NetSink* top)
{
std::unique_lock<std::mutex> lk1(cbMutex);
result = ikcp_send(cb, buf.data(), buf.size());
NetGraphSink::instance()->localStat.sync(cb);
}

if (result < 0)
Expand Down Expand Up @@ -1051,6 +1053,7 @@ int KcpLayer::input(NetBuffer&& buf, const NetContext& ctx, const NetSource* bot
}
peeksize = ikcp_peeksize(cb);
}
NetGraphSink::instance()->localStat.sync(cb);
}

std::unique_lock<std::mutex> lk2(updateCvMutex);
Expand Down

0 comments on commit 460eb72

Please sign in to comment.