Skip to content

Commit

Permalink
net: fix two typos in yield internal
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed Sep 29, 2024
1 parent 4134025 commit 0307fac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cli/cli_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ void CliConnection::WriteUpstreamInPipe() {
if (GetMonotonicTime() > yield_upstream_after_time_ ||
bytes_upstream_passed_without_yield_ > kYieldAfterBytesRead) {
bytes_upstream_passed_without_yield_ = 0U;
yield_upstream_after_time_ = GetMonotonicTime() + kYieldAfterDurationMilliseconds;
yield_upstream_after_time_ = GetMonotonicTime() + kYieldAfterDurationMilliseconds * 1000 * 1000;
if (upstream_.empty()) {
try_again = true;
yield = true;
Expand Down
6 changes: 2 additions & 4 deletions src/net/content_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ class ContentServer {
enable_tls_ &= T::Type == CONNECTION_FACTORY_SERVER;
DCHECK_LE(remote_host_sni_.size(), (unsigned int)TLSEXT_MAXLEN_host_name);

VLOG(1) << "ContentServer (" << T::Name << ") "
<< " allocated memory";
VLOG(1) << "ContentServer (" << T::Name << ") allocated memory";
}

~ContentServer() {
VLOG(1) << "ContentServer (" << T::Name << ") "
<< " freed memory";
VLOG(1) << "ContentServer (" << T::Name << ") freed memory";

CHECK_EQ(pending_next_listen_ctxes_.size(), 0u) << "ContentServer freed on pending listen ctx";
CHECK_EQ(opened_connections_, 0u) << "ContentServer freed on non-closed connections";
Expand Down
2 changes: 1 addition & 1 deletion src/server/server_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ void ServerConnection::WriteUpstreamInPipe() {
if (GetMonotonicTime() > yield_upstream_after_time_ ||
bytes_upstream_passed_without_yield_ > kYieldAfterBytesRead) {
bytes_upstream_passed_without_yield_ = 0U;
yield_upstream_after_time_ = GetMonotonicTime() + kYieldAfterDurationMilliseconds;
yield_upstream_after_time_ = GetMonotonicTime() + kYieldAfterDurationMilliseconds * 1000 * 1000;
if (upstream_.empty()) {
try_again = true;
yield = true;
Expand Down

0 comments on commit 0307fac

Please sign in to comment.