This content has been marked as final.
Show 1 reply
-
1. Re: AprEndpoint$Acceptor blocking on accept.
beve Jan 23, 2008 7:18 AM (in response to beve)I've learnt that the Apr connector has a unlockAccept
method that should break the accept call by
making a dummy request to 127.0.0.1"
But I can't get this to work unless I write something to the socket like this:protected void unlockAccept() { java.net.Socket s = null; try { // Need to create a connection to unlock the accept(); if (address == null) { s = new java.net.Socket("127.0.0.1", port); } else { s = new java.net.Socket(address, port); // setting soLinger to a small value will help shutdown the // connection quicker s.setSoLinger(true, 0); } s.getOutputStream().write("dummyStr".getBytes()); } catch(Exception e) { ... }
Is anyone else seeing this behaviour
Thanks,
Daniel