unity3d-jp / MeshSync

A package for synchronizing meshes/models editing in DCC tools into Unity in real time.
Other
1.55k stars 174 forks source link

fix: server hanging on exit, after updating package version #798

Closed seandillon92 closed 1 year ago

seandillon92 commented 1 year ago

Important: with this solution the application quits only after 20s on my machine. This has been tested when updating between 0.14.5-preview to 0.15.1-preview. I also created an artificial new version 0.15.5 and when updating between 0.15.1-preview and 0.15.5, quitting is instant.

The stop function in our server does not actually stop the server, but rather resets the unique pointer to the server. To stop the server when quitting the editor, I have subscribed to the EditorApplication.quitting event where we can invoke Server.Abort() which will stop the server and abort all current requests.

More info here on HttpServer::stopAll https://github.com/pocoproject/poco/blob/5c3f827c8639a996dd0d27a77f48d343ed6fe524/Net/include/Poco/Net/HTTPServer.h

sindharta commented 1 year ago

We need to make this for the next minor release because there is a DLL update.

seandillon92 commented 1 year ago

We need to make this for the next minor release because there is a DLL update.

Is there a technical reason behind this, or is this part of our versioning process?

sindharta commented 1 year ago

Is there a technical reason behind this, or is this part of our versioning process?

It is for ensuring that all versions of MeshSyncDCCPlugins@0.15.x are compatible with all versions of MeshSync@0.15.x So yes, it is part of the versioning process