Skip to content

Commit

Permalink
Doc 2
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Oct 27, 2024
1 parent aaf2d43 commit ffda278
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@ void Server::AsyncRunStep(float dtime, bool initial_step)
m_shutdown_state.tick(dtime, this);
}

//! Receive all incoming packets and wait for at least `timeout` seconds.
void Server::Receive(float timeout)
{
ZoneScoped;
Expand All @@ -1106,7 +1105,6 @@ void Server::Receive(float timeout)
// Round up since the target step length is the minimum step length,
// we only have millisecond precision and we don't want to busy-wait by calling
// ReceiveTimeoutMs(.., 0) repeatedly.
// Also be sure we don't wait if the remaining time is zero/negative.
if (!m_con->ReceiveTimeoutMs(&pkt,
((u32)remaining_time_us() + 999) / 1000)) {
// No incoming data.
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Server : public con::PeerHandler, public MapEventReceiver,

// This is run by ServerThread and does the actual processing
void AsyncRunStep(float dtime, bool initial_step = false);
//! Receive all incoming packets and wait for at least `timeout` seconds.
// Receive all incoming packets and wait for at least `timeout` seconds.
void Receive(float timeout);
void yieldToOtherThreads(float dtime);

Expand Down

0 comments on commit ffda278

Please sign in to comment.