Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-03-23
06:44 • Closed ticket [506304ffff]: socket timeout requires program restart plus 6 o... artifact: 3187eb4238 user: hobbs
2002-01-21
06:11 • New ticket [506304ffff]. artifact: d077e9261e user: apulsifer

socket timeout requires program restart

Closed506304ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-01-21 06:11:23
This bug is in the socket command under Win 2K SP 2, 
which also affects the http package.  Sorry if I 
entered it under the wrong category.

I have a script that downloads a bunch of web pages:

while {[catch {set sp [socket $host $port]} errmsg]} {
puts "socket failed: $errmsg"
after 10000
}

Eventually, (usually after 10-20 minutes of 
operation), the socket command will begin returning:

$errmsg = couldn't open socket: connection timed out

It will continue returning this error until I stop the 
program with control-C.  When I rerun the program, 
every thing is immediately fixed.

I'm running under Win 2K SP 2.  This error condition 
occurs only under v 8.3.4.  I downgraded to v8.3.2 and 
I no longer have this problem.

This error condition occurs when using the http 
package, and when using the socket command directly.
hobbsplain2002-03-23 06:44:34
Logged In: YES 
user_id=72656

In the sample, are you ever closing the sockets or doing 
http::cleanup on the http tokens?  If not, this sounds like 
a simple problem of running out of available handles.  That 
wouldn't make sense if this really works in 8.3.2, but I'd 
like to see a full sample script.
Log in (anonymous is fine) to add a comment.