Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Error "File exists" at connect
From: Arash Abghari (arash.abghari_at_[hidden])
Date: 2012-01-20 10:38:04

On 01/17/12 13:34, Igor R wrote:
>>>> I am running a server and client using boost::asio. There are 10 clients
>>>> sending requests simultaneously to the server. Sometimes one of the
>>>> clients
>>>> returns the error "File exist" when ip::tcp::socket::connect() is called.
>>>> Do you have any idea what possibly could cause this error?
>>> What's the error code?
>> the error value is 17 and the category is system. By the way, the system is
>> Linux 32 bit and Boost version is 1.40
> It's EEXIST error, and it's weird you get it for tcp socket.
> The only idea I can suggest is to ensure you don't have some
> race-condition with your sockets during there lifetime (note that a
> socket object is not thread-safe).
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

some tcp::socket accesses were protected by boost::shared_lock in the
code. I replaced them with boost::unique_lock and it seems the problem
is solved so far.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at