From 00cd730c3fea2343435f3ac4c9dfa08de0c00253 Mon Sep 17 00:00:00 2001 From: "John C. Vernaleo" Date: Fri, 9 Aug 2013 16:20:06 -0400 Subject: [PATCH] Add stop command to rpcserver. --- rpcserver.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 520030fd..201e47ab 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -150,6 +150,13 @@ func jsonRpcRead(w http.ResponseWriter, r *http.Request, s *rpcServer) { // Deal with commands switch message.Method { + case "stop": + rawReply = btcjson.Reply{ + Result: "btcd stopping.", + Error: nil, + Id: &message.Id, + } + s.server.Stop() case "getblockcount": _, maxidx, _ := s.server.db.NewestSha() rawReply = btcjson.Reply{