This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-108
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-108 by this push:
     new 8c65e63  Update NCCli.scala
8c65e63 is described below

commit 8c65e63f0419cc3bd17768eaf36ff13311f4469a
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Oct 3 01:46:19 2020 -0700

    Update NCCli.scala
---
 .../scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 5b246c9..a8c7f78 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -661,9 +661,12 @@ object NCCli extends App {
             case Some(beacon) ⇒
                 val pid = beacon.pid
 
-                if (beacon.ph.destroy())
+                if (beacon.ph.destroy()) {
                     logln(s"Local REST server (pid ${c(pid)}) has been 
stopped.")
-                else
+
+                    // Update state right away.
+                    state.isServer = false
+                } else
                     error(s"Failed to stop the local REST server (pid 
${c(pid)}).")
 
             case None ⇒
@@ -955,7 +958,7 @@ object NCCli extends App {
         pinger.start()
 
         while (!exit) {
-            val prompt = if (state.isServer) 
s"${y("\uD83D\uDCBB")}${g("\u25b6")} " else s"${g("\u25b6")} "
+            val prompt = if (state.isServer) s"${y("\u2699 ")}${g("\u25b6")} " 
else s"${g("\u25b6")} "
 
             val rawLine =
                 try

Reply via email to