Permalink
Browse files

optimize two sends into one

  • Loading branch information...
Josep M. Bach
Josep M. Bach committed Sep 21, 2012
1 parent 592cacf commit efdb964ba3bf7270fa8fb091e2ab360eaa5c88a3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/shitdb/server.c
View
@@ -201,8 +201,8 @@ void Server_start(DB *db, int port)
if(rc == 0) {
if (result->type != tNil) {
bstring ret = Object_to_string(result);
+ bconchar(ret, '\n');
send(accept_fd, bdata(ret), blength(ret), 0);
- send(accept_fd, "\n", 2, 0);
} else {
send(accept_fd, "OK\n", 4, 0);
}

0 comments on commit efdb964

Please sign in to comment.