Sometimes (pretty rarely) when I connect to a running instance of a com.sun.net.httpserver.HttpServer I get a "connection refused" message back.
Anybody know why this might be? Is there a thread limit to the number of connections it can handle? Can I increase it? Thanks. -r
From the doc:
You may be seeing this.
Alternatively, have you set an executor using setExecutor(). The default executor may have fewer threads configured than you need, and a suitably-configured ThreadPoolExecutor may work.