From 2166c6ff1954fb03ad93c86f1c72b2e3251c9a7f Mon Sep 17 00:00:00 2001 From: wenyekui Date: Fri, 1 Aug 2014 11:59:16 +0800 Subject: [PATCH] add a extra bool value when returning status --- server/client_http.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/client_http.go b/server/client_http.go index a2ae729..f31c4df 100644 --- a/server/client_http.go +++ b/server/client_http.go @@ -147,7 +147,11 @@ func (w *httpWriter) writeError(err error) { } func (w *httpWriter) writeStatus(status string) { - w.genericWrite(status) + var success bool + if status == OK || status == PONG { + success = true + } + w.genericWrite([]interface{}{success, status}) } func (w *httpWriter) writeInteger(n int64) {