public synchronized Exception getException() {
        Exception e = exception;
        for (ConnectionProcessor pipe : pipes) {
            if (e == null) {
                e = pipe.getException();
            }
            if (e != null) return e;
        }
        return e;
    }