Re: [Quickfix-developers] file descriptor/memory leak in ThreadedSocketInitiator
Brought to you by:
orenmnero
|
From: Alex S. <al...@ya...> - 2007-01-08 16:43:00
|
Oren,
I looked at the latest code in the repository and
revision 1725 and found that the problem still exists.
The fix you are referring to tries (I think) to
address socket cleanup inside of
ThreadedSocketConnection.
The problem occurs prior to the creation of the
ThreadedSocketConnection instance, when doConnect
returns without cleaning up the socket. I fixed it by
inserting "socket_close( socket );":
int socket = socket_createConnector();
if( socket_connect(socket, address.c_str(), port)
< 0 )
{
log->onEvent( "Connection failed" );
socket_close( socket );
return false;
}
log->onEvent( "Connection succeeded" );
ThreadedSocketConnection* pConnection =
new ThreadedSocketConnection( s, socket,
getApplication(), *this );
Alex
--- Oren Miller <or...@qu...> wrote:
> Alex, what version of QuickFIX are you using?
>
> > Hi,
> >
> > We left our application running over the holidays
> > continuously trying to reconnect to a server and
> > failing. When we came back, the whole server
> seemed to
> > be broken. All applications were failing because
> they
> > could not allocate any file descriptors from the
> OS
> > (Windows Server 2003)
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|