title: RSelenium: server signals port is already in use
body: <p>I'm using the following code in RSelenium to open a browser. After I close the browser, or even close the handler by running remDr$close(), the port is still in use. I have to go to the terminal and manually kill the process so that the same port becomes available. Is there any automated way such that RSelenium makes the port free after it finishes scraping?</p>
  
  <p>So here is my code:</p>
  
  <pre><code>library(RSelenium)
  rD &lt;- rsDriver(verbose = FALSE,port=4444L)
  remDr &lt;- rD$client
  remDr$close()
  </code></pre>
  
  <p>Thanks</p>