[AGENT++] SNMP++ Slow socket closing and SNMP_CLASS_TL_IN_USE

Stoyan Haralampiev tony at gyuvetch.bg
Wed Jan 17 14:33:27 CET 2007


Hi again,

One more trouble with SNMP++ for this week :)

This time it's about
Snmp::notify_register() returning SNMP_CLASS_TL_IN_USE when called several consequtive times. I tested it both under Win32 and Linux and it happens only under Linux.

As far as
I understand the socket
does not
get closed during the call to close() and when bind is attempted again in a very short time (several mls) the address/port seem to already be in use.

It seems that using SO_REUSEADDR (or maybe SO_LINGER but this could be more complex because of getting the right timeout value) would solve the problem.

What do you think?

Best regards,
Tony

-----------------------------------------------------------------
Заложете на късмета си със Спортингбет!


More information about the AGENTPP mailing list