Hi all, I recently tried supporting keep-alive sockets with my Metacard server app (HTTP - based originally on metacard-httpd). However, I get strange behavior. Frequently when a new request comes in, I get duplicate sockets (not always, but usually within a few minutes and a couple dozen requests). For example, openSockets() returns: 8080 127.0.0.1|2038436 127.0.0.1|2038436 Note that the second and third sockets are exactly the same! Whenever this happens, the duplicate sockets are impossible to close- calling close socket does not remove them from the openSockets. My scripts are pretty simple: when the browser sends me "Connection: Keep-Alive" in the HTTP header, I send back the same "Connection: Keep-Alive" line in my reply, and instead of closing the socket, I do something like this which will take another request on the same socket if it comes in within 60 seconds: set the socketTimeoutInterval to 60000 read from socket thisSocket for 1 line with message "keepaliveconnect" Does anyone have an idea of what's going on? Bug? Feature? I'm running MacOS 9.1. Regards, Brian Archives: http://www.mail-archive.com/[email protected]/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
