-1

Don't understand why I can't off akka-http server.

Have the next code:

   path("api" / "system" / "shutdown") {
     logger.warning("shutting down insights application")
     appLifecycle.shutdown()
     complete(JsObject(Map("status" -> JsString("shutting_down"))))
   }
 }

def shutdown(): Unit                         = actor ! Shutdown

As a result, I got the next message -> The requested resource could not be found inside chrome I also got next message inside terminal -> com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: java.io.StringReader@421ea4c0; line: 1, column: 1]

Any ideas?

1 Answers1

-2

First of all I think you should add a post directive, then you should either do:

system.terminate()

or:

actor ! Kill // or PoisonPill
AminMal
  • 3,070
  • 2
  • 6
  • 15