When the httpuv packages is unloaded, it should stop all running servers, wait a little while for them to stop, and then terminate them if necessary (so that background thread will stop).
This issue shows itself when, on Windows, a server is running, and then in RStudio, you run Install and Restart. RStudio calls .rs.forceUnloadPackage(), which unloads the package in the R process, but the DLL stays loaded because of the running code, and the installation fails because the DLL can't be replaced.
When the httpuv packages is unloaded, it should stop all running servers, wait a little while for them to stop, and then terminate them if necessary (so that background thread will stop).
This issue shows itself when, on Windows, a server is running, and then in RStudio, you run Install and Restart. RStudio calls
.rs.forceUnloadPackage()
, which unloads the package in the R process, but the DLL stays loaded because of the running code, and the installation fails because the DLL can't be replaced.