From 3dbe2c8c9bcda18a09b4a75b3c56afb35058a53d Mon Sep 17 00:00:00 2001
From: Thiago de Arruda <tpadilha84@gmail.com>
Date: Tue, 29 Oct 2013 19:01:31 -0300
Subject: [PATCH] Fixed server log statements

---
 completion-server.zsh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/completion-server.zsh b/completion-server.zsh
index 6d6aeca..90a8f17 100755
--- a/completion-server.zsh
+++ b/completion-server.zsh
@@ -14,13 +14,13 @@ read-to-null() {
 accept-connection() {
 	zsocket -a $server
 	fds[$REPLY]=1
-	print "connection accepted, fd: $REPLY" >&2
+	print "connection accepted, fd: $REPLY"
 }
 
 handle-request() {
 	local connection=$1 current line
 	integer read_something=0
-	print "request received from fd $connection" >&2
+	print "request received from fd $connection"
 	while read -u $connection prefix &> /dev/null; do
 		read_something=1
 		# send the prefix to be completed followed by a TAB to force
@@ -44,7 +44,7 @@ handle-request() {
 		break # handle more requests/return to zselect
 	done
 	if ! (( read_something )); then
-		print "connection with fd $connection closed" >&2
+		print "connection with fd $connection closed"
 	  unset fds[$connection]
 		exec {connection}>&- # free the file descriptor
 	fi
@@ -68,7 +68,6 @@ exec < /dev/null
 zmodload zsh/zpty
 zmodload zsh/zselect
 zmodload zsh/net/socket
-zmodload zsh/net/socket
 setopt noglob
 print "autosuggestion server started, pid: $$"