Skip to content
Snippets Groups Projects
Commit 5e441a7e authored by Florian Fischer's avatar Florian Fischer Committed by Florian Fischer
Browse files

[EchoClient] add flag to disable the final quit message

parent b86d13ad
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,7 @@ size_t size = SIZE;
size_t server_backlog = SERVER_BACKLOG;
bool linked_futures;
bool histogram = false;
bool sendQuit = true;
std::atomic<bool> terminate = false;
......@@ -226,8 +227,8 @@ class Client {
}
public:
void shutdown(bool sendQuit) const {
if (sendQuit) {
void shutdown(bool isQuitClient) const {
if (sendQuit && isQuitClient) {
LOGI("Send quit message");
std::string msg = "quit\n";
ssize_t res = emper::io::sendAndWait(sock, msg.c_str(), msg.size(), MSG_NOSIGNAL);
......@@ -438,6 +439,8 @@ auto main(int argc, char* argv[]) -> int {
}
}
sendQuit = !existsOption(argc, argv, "--no-quit");
int histogram_fd;
char* histogram_file = getOption(argc, argv, "--histogram");
if (histogram_file) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment