dart-server-nano icon indicating copy to clipboard operation
dart-server-nano copied to clipboard

server can't be stopped

Open lexxxel opened this issue 1 year ago • 5 comments

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).

lexxxel avatar May 24 '24 21:05 lexxxel

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

jonataslaw avatar May 25 '24 11:05 jonataslaw

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.

lexxxel avatar May 25 '24 16:05 lexxxel

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

I have done that.

shajin-screl avatar Jul 18 '24 10:07 shajin-screl

@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.

lexxxel avatar Jul 18 '24 11:07 lexxxel

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.

shajin-screl avatar Jul 19 '24 04:07 shajin-screl