cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to handle errors related to limit on multiple connections from same client

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 17 Aug 2014 23:00:04 +0200 (CEST)

On Tue, 12 Aug 2014, Vishakha Vaidya wrote:

> I using CURL multi interface for ftp. The server is external and has a limit
> on the number of simultaneous connections from the same client, which is
> unknown. When I am transferring multiple files, some transfers fail because
> of this limit. How can I best handle this scenario, such that all files are
> transferred successfully? The error that I get is either CURLE_LOGIN_DENIED
> or CURLE_RECV_ERROR or CURLE_SEND_ERROR.

How come it can return so many different return codes for that single problem?
Aren't you just not being allowed to login with another connection once you
reach the limit?

> But these errors can occur in other scenarios as well, like loss of network
> connection. Is there a single error that indicates failed transfer is due to
> a limit on the server?

FTP has no specific protocol support for returning such an error. It is
usually implement to just reject the login if you overstep any sort of
boundary. How does your server do it, protocol-wise ?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-17