#2400 How to stop WispService by external command

shturman Mon 9 Mar 2015

If in one terminal window start wisp:

fansh> wisp::WispService { port = 8080 }.start

Then in another terminal window i can't stop it:

fansh> Service.find(wisp::WispService#).stop

sys::UnknownServiceErr: wisp::WispService

How to do it?

brian Mon 9 Mar 2015

Service lookup is only within the same process (not across processes). So you can find in the same fansh process that launched it, but not from another fansh process

SlimerDude Mon 9 Mar 2015

Yeah, wot Brian said!

Plus, as far as I know, there isn't a way to remotely shutdown wisp so I think you'll have to implement it yourself.

I know it's common for other app / web servers to listen on another port for server commands. I did think about about doing something similar for BedSheet but I couldn't find a compelling reason to add it. In dev I just use CTRL+C and on servers a polite kill command cleanly shuts the fantom / wisp server down.

Login or Signup to reply.