jonataslaw / dart-server-nano

A light, fast, and friendly server written in Dart.
MIT License
23 stars 4 forks source link

server can't be stopped #16

Open lexxxel opened 3 months ago

lexxxel commented 3 months ago

If I see it correctly, the server can't be stopped, the function that might implement this is commented out (and the _server is also not fully integrated, if I see that correctly).

jonataslaw commented 3 months ago

You alright, but I will implement this feature. We need to store the isolate port from each process and kill the server within it.

lexxxel commented 3 months ago

So it sounds like you have not really started to implement this. Would you accept PR, because it would be in my interest to get this feature fast, but it makes no sense to do the same task in parallel.

shajin-screl commented 1 month ago

@lexxxel You can just uncomment & you are good to go.

I have done that.

lexxxel commented 1 month ago

@lexxxel You can just uncomment & you are good to go.

I have done that.

You sure, you have ServerMode set to performance? Because the isolates for the worker threads are not saved, yet. You might have used Compatibility Mode, yes it might work there, but I have not checked the code for the websocket handler.

shajin-screl commented 1 month ago

You are alright, I have ServerMode set to Compatibility.

But for me I have strong reason :

  1. I am running this is Flutter env & I need to refresh UI on sockets events which is not possible when using isolates for the worker threads of performance mode.

  2. I want to have stop button in UI to forcefully stop the server.

Anyhow I unsure about performance mode don't allow all this.