Skip to content

Commit

Permalink
[core] Raylet log error and handle abortion from accept() call (ray-p…
Browse files Browse the repository at this point in the history
…roject#43659)

- logs the error message from accept() call
- if the error is operation_aborted, that means the raylet is shutting down and we should not continue to do accept()

Signed-off-by: hongchaodeng <hongchaodeng1@gmail.com>
  • Loading branch information
hongchaodeng authored Mar 13, 2024
1 parent 3507d5b commit afea549
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ray/raylet/raylet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ void Raylet::HandleAccept(const boost::system::error_code &error) {
"worker",
node_manager_message_enum,
static_cast<int64_t>(protocol::MessageType::DisconnectClient));
}
} else {
RAY_LOG(ERROR) << "Raylet failed to accept new connection: " << error.message();
if (error == boost::asio::error::operation_aborted) {
// The server is being destroyed. Don't continue accepting connections.
return;
}
};

// We're ready to accept another client.
DoAccept();
}
Expand Down

0 comments on commit afea549

Please sign in to comment.