From b677f9da63c563c6abb44ab733f7fabe456ba57a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 25 Mar 2014 09:23:11 +0000 Subject: [PATCH] do not write the trailing nul char in send_commands That triggered creation of a new client, followed by it's immediate destruction due to the connection closing. --- src/remote.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote.cc b/src/remote.cc index ecdc03ce1..e2c744173 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -467,7 +467,7 @@ void send_command(const String& session, const String& command) { Message msg(sock); - msg.write(command.c_str(), (int)command.length()+1); + msg.write(command.c_str(), (int)command.length()); } close(sock); }