private Connection acceptConnection(AcceptedSocket newSocket)
throws LLPException, IOException {
Connection conn = null;
if (newSocket != null) {
String address = newSocket.socket.getInetAddress().getHostAddress();
AcceptedSocket otherSocket = waitingForSecondSocket.remove(address);
if (otherSocket != null && otherSocket.origin != newSocket.origin) {
log.debug("Socket {} completes a two-port connection",
newSocket.socket);
Socket in = getInboundSocket(newSocket, otherSocket);
Socket out = getOutboundSocket(newSocket, otherSocket);