hi, I recently found TCPStream bug when performing TCPStream::open(). here is my code:
TCPStream client; client.setTimeout(5000); //this will let connect() function be non-block while(1) { client.connect(IPV4Host, port, buffer); if(!client.isConnected()) { ::usleep(1000000*3); continue; } } Once the first run in connect() failed, it will keep connecting to indicated IP and port but the 2nd time it connect, will cause the socket error (I print out the errno) I found the socket do not re-initialize when connect() failed. if add the code in line 3125 so = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); it will work well
_______________________________________________ Bug-commoncpp mailing list Bug-commoncpp@gnu.org http://lists.gnu.org/mailman/listinfo/bug-commoncpp