[AGENT++] Re: recvfrom's blocking and process grinding to a halt
Jochen Katz
katz at agentpp.com
Thu Mar 23 22:24:19 CET 2006
Hi,
> However, looking at the code in uxsnmp.cpp I did notice one more thing. In
> Snmp::init() I see that a socket gets allocated with a socket() call early
> on, then if that succeeds a bind() call occurs. If either of these fails
> construct_status is set to some error code. Then in the destructor the
> construct_status member is checked, and if not set to an error the socket is
> closed by a call to close(). The issue here is if the socket() call
> succeeded, but the bind() call failed, then the socket is never closed.
> There should probably be a close() call within the error handling right
> after the bind() call fails. This appears to apply to both ipv4 and ipv6
> within the function.
ok, I removed the construct_status vars and now check the socket vars
for INVALID_SOCKET. And there was another issue, the eventlistholder
wasn't deleted either. Just wait for the next snapshot...
Regards,
Jochen
More information about the AGENTPP
mailing list