fix(web-server): implement a timeout on webServer.close()

Closes #952