camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekz <ekizo...@gmail.com>
Subject Re: FTP Reconnect attempt problem
Date Wed, 08 Apr 2015 15:35:00 GMT
I think i found the problem, 
The code cannot reach to the sleep(reconnectDelay) because
getMaximumReconnectAttempts() is zero.
I need maximumReconnectAttempts=0 to work with customPollStrategy to caught
exceptions, 
but need to set reconnectDelay either.
Any ideas will be appreciated.

//From SftpOperations class:
                ...
                LOG.trace("Cannot connect due: {}", failed.getMessage());
                attempt++;
                if (attempt > *endpoint.getMaximumReconnectAttempts()*) {
                    throw failed;
                }
                if (*endpoint.getReconnectDelay()* > 0) {
                    try {
                        Thread.sleep(endpoint.getReconnectDelay());
                    } catch (InterruptedException ie) {
                        // we could potentially also be interrupted during
sleep
                        Thread.currentThread().interrupt();
                        throw new
GenericFileOperationFailedException("Interrupted during sleeping", ie);
                    }
                }
                ...



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-Reconnect-attempt-problem-tp5765466p5765484.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message