Why would connect fail?

My program fails to connect to the server, and it seems to fail at
TCP_NEED_CONNECT.  The macro NETCALL_WOULD_BLOCK returns true, which means
err == WSAEWOULDBLOCK.

According to the Windows documentation, this is not a fatal condition.  But
my program is stuck at that point, and cannot go on...

Any idea why this is happening?  Thanks.

Windows Documentation
==================

WSAEWOULDBLOCK
(10035)

Resource temporarily unavailable.

This error is returned from operations on non-blocking sockets that cannot
be completed immediately, for example recv when no data is queued to be read
from the socket. It is a non-fatal error, and the operation should be
retried later. It is normal for WSAEWOULDBLOCK to be reported as the result
from calling connect on a non-blocking SOCK_STREAM socket, since some time
must elapse for the connection to be established.

The follwing is a trace:

================

.Request..... Created 00497100
ChunkStream. Chunk 00497240 created with max size 0
HTAccess.... Accessing document http://packers.netgravity.com/
Net Before.. calling 10005250 (request 00497100, context 00000000)
Net Before.. calling 10005710 (request 00497100, context 00000000)
URL Tree.... did NOT find `w3c-AA'
Credentials. verified
Net Before.. calling 10009652 (request 00497100, context 00000000)
URL Tree.... did NOT find `w3c-pep'
Net Before.. calling 10005180 (request 00497100, context 00000000)
Net Object.. 00497740 created with hash 0
Net Object.. starting request 00497100 (retry=1) with net object 00497740
HTTP........ Looking for `http://packers.netgravity.com/'
HTHost parse Looking up `packers.netgravity.com' on port 80
Event....... Created event 00497A60 with context 00497980, priority 20, and
time
out -1
Event....... Created event 00497A80 with context 00497980, priority 20, and
time
out -1
Event....... Created event 00497AA0 with context 00497980, priority 20, and
time
out -1
Event....... Created event 00497AC0 with context 00497980, priority 20, and
time
out -1
Event....... Created event 00497AE0 with context 00497980, priority 20, and
time
out -1
Event....... Created event 00497B00 with context 00497980, priority 20, and
time
out -1
Host info... added `packers.netgravity.com' with host 00497980 to list
00497970
Host connect Grabbing lock on Host 00497980 with 00497740
Host info... Added Net 00497740 (request 00497100) to pipe on Host 00497980,
1 r
equests made, 1 requests in pipe, 0 pending
HTHost...... No ActivateRequest callback handler registered
HTHost 00497980 going to state TCP_CHANNEL.
HTHost 00497980 going to state TCP_DNS.
DNS Add..... `packers.netgravity.com' with 1 home(s) to 00497C60
ParseInet... as port 80 on 209.117.136.71 with 1 homes
HTHost 00497980 going to state TCP_NEED_SOCKET.
Socket...... Created 144
Net Manager. Increasing active sockets to 1, 0 persistent sockets
Socket...... Turned off Nagle's algorithm
Socket...... Non-blocking socket
Channel..... Hash value is 10
Channel..... Added 00497650 to list 00497FA0
Reader...... Created reader stream 016B0040
Socket...... TCP send buffer size is 8192 for socket 144
HTHost 00497980 going to state TCP_NEED_CONNECT.
HTDoConnect. WOULD BLOCK `packers.netgravity.com'
WWWLibTerm.. Cleaning up LIBRARY OF COMMON CODE
Net Object.. Kill ALL Net objects!!!
Net Object.. Killing 00497740
Error....... Add  59    Severity: 1     Parameter: `Unspecified'
Where: `
HTLoadHTTP'
HTTP Clean.. Called with status -902, net 00497740
Net Object.. Delete 00497740 and call AFTER filters
Host info... Remove 00497740 from pipe
Host Object. closing socket 144
Channel..... Semaphore set to 0 for channel 00497650
Channel..... Delete 00497650 with semaphore 0
Buffer...... ABORTING...
Socket read. FREEING....
Socket write FREEING....
Net Manager. Decreasing active sockets to 0, 0 persistent sockets
Channel..... Deleted 00497650, socket 144
Host info... removed host 00497980 as persistent
Net Object.. Check for pending Net objects
Net Object.. Freeing object 00497740
Response.... Created 00497C70
Net After... calling 100057B0 (request 00497100, response 00497C70,
status -902,
 context 00000000)
Net After... calling 10009658 (request 00497100, response 00497C70,
status -902,
 context 00000000)
Net After... calling 100053D0 (request 00497100, response 00497C70,
status -902,
 context 00000000)
Load End.... Request ended with code -902
Net After... calling 00401000 (request 00497100, response 00497C70,
status -902,
 context 00000000)
>----- no text -----
Request..... Delete 00497100
Request..... Deleting dangling output stream
Chunkstream. FREEING...
Response.... Delete 00497C70

Received on Tuesday, 23 February 1999 22:53:31 UTC