So I got this simple java HTTP server together, (I know about Jetty ext. I need my own.)
I can make requests, receives, and put a response. But only once.
Afterwords, I don't receive anything. Which is odd, iv tried killing the connection after every request, to force a reset but it just does not want anything to do with it.
Chrome Dev Tools:
While the console shows:
Trying to bind to localhost on port 8080...OK!
Ready, Waiting for connections...
24.---.---.--- connected to server.
24.---.---.--- requested /index.html ... processed OK.
24.---.---.--- connected to server. (I don't get any data, just times out)
The 24.---.---.--- page isn’t working
24.---.---.--- didn’t send any data.
Problem was not with HTTP server.
After looking at it with fresh eyes, the problem was located in my Thread-pool. The pool was processing 1 request then shutting itself down, making it appear to be a HTTP issue.
Does not behave like you would expect, it adds it to the queue, instead of you having to make a loop to pop Runnable objects from a List stack.