System.out.println("socket created: " + mySocket);
    public void connect() throws IOException {        if (mySocket == null || isStale()) {            if (mySocket != null) {                DebugLog.log("connection is silently closed by server, forcing reconnect.");            }            close();            String host = mySVNRepositoryLocation.getHost();            int port = mySVNRepositoryLocation.getPort();            if (isProxied() && getProxyPort() > 0 && getProxyHost() != null) {                mySocket = SocketFactory.createPlainSocket(getProxyHost(), getProxyPort());                if (isSecured()) {                    Map props = new HashMap();                    if (getProxyAuthString() != null) {                        props.put("Proxy-Authorization", getProxyAuthString());                    }                    myOutputStream = DebugLog.getLoggingOutputStream("http", mySocket.getOutputStream());                    /*                    OutputStream os = mySocket.getOutputStream();                    os.write("CONNECT ".getBytes());                    os.write((mySVNRepositoryLocation.getHost() + ":" + mySVNRepositoryLocation.getPort()).getBytes());                    os.write(" HTTP/1.1".getBytes());                    os.write("\r\n".getBytes());                    os.write("\r\n".getBytes());                    os.flush();                    */                    sendHeader("CONNECT", mySVNRepositoryLocation.getHost() + ":" + mySVNRepositoryLocation.getPort(), props, null);                    myOutputStream.flush();                    System.out.println("reading connect responce");                    DAVStatus status = readHeader(new HashMap());                    if (status != null && status.getResponseCode() == 200) {                        myInputStream = null;                        myOutputStream = null;                        System.out.println("creating new socket!");                        mySocket = SocketFactory.createSSLSocket(DAVRepositoryFactory.getSSLManager(), host, port, mySocket);                        System.out.println("created: " + mySocket);                        return;                    }                    System.out.println("no header read");                    throw new IOException("couldn't establish http tunnel for proxied secure connection: " + (status != null ? status.getErrorText() + "" : " for unknow reason"));                }            } else {                mySocket = isSecured() ? SocketFactory.createSSLSocket(DAVRepositoryFactory.getSSLManager(), host, port)                        : SocketFactory.createPlainSocket(host, port);                System.out.println("socket created: " + mySocket);            }            myConnectCount++;        }     }