aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/socket.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/socket.go b/lib/socket.go
index fe473ba..d5db3dc 100644
--- a/lib/socket.go
+++ b/lib/socket.go
@@ -76,7 +76,11 @@ func (as *AercServer) handleClient(conn net.Conn) {
if as.OnMailto != nil {
err = as.OnMailto(mailto)
}
- conn.Write([]byte(fmt.Sprintf("result: %v\n", err)))
+ if err != nil {
+ conn.Write([]byte(fmt.Sprintf("result: %v\n", err)))
+ } else {
+ conn.Write([]byte(fmt.Sprint("result: success\n")))
+ }
}
}
as.logger.Printf("Closed Unix connection %d", clientId)