Artifact
792f167477dddadb7eb6c7587ebcdef3ab6eb24a:
Ticket change
[792f167477]
- New ticket
[218696ffffffffff|218696ffff] <i>Async socket connect hangs</i>.
by
nobody on
2000-10-26 01:04:13.
D 2000-10-26T01:04:13
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s1776\sBug\nVersion:\s8.0.5\nSubmitDate:\s'1999-04-09'\nLastModified:\s'1999-04-12'\nSeverity:\sCRIT\nStatus:\sReleased\nSubmitter:\spat\nChangedBy:\spat\nRelatedBugIDs:\s1664\nOS:\sWindows\sNT\nOSVersion:\s4.0\sSP3\nMachine:\sX86\nFixedDate:\s'1999-04-13'\nFixedInVersion:\s8.1b3\nClosedDate:\s'2000-10-25'\n\n\nName:\nDennis\sParker\n\nExtensions:\nnone\n\nCustomShell:\nnone\sbesides\sabove\sfix\n\nReproducibleScript:\nThis\sis\sthe\ssame\sproblem\sreported\sin\sa\sprevious\sbug\ssubmission\s(by\n\s\s\s\ssomeone\n\s\s\s\selse)\swith\sthis\stext:\n\s\s\s\s\n\s\s\s\s\n\s\s\s\sTcl\s8.0.5\sBug:\s\sGenerated\sby\sScriptics'\sbug\sentry\sform\sat\n\s\s\s\s\s\s\s\s\s\s\s\shttp://www.scriptics.com/support/bugForm.html\n\s\s\s\sResponses\sto\sthis\spost\sare\sencouraged.\n\s\s\s\s------\n\s\s\s\s\n\s\s\s\sSubmitted\sby:\s\smo\n\s\s\s\sOperatingSystem:\s\sWindows\sNT\n\s\s\s\sOperatingSystemVersion:\s\s4.0\sSP3\n\s\s\s\sSynopsis:\s\ssocket\s-async\scombined\swith\sfileevent\sdoes\snot\swork\sunder\sNT\n\s\s\s\s\n\s\s\s\sReproducibleScript:\n\s\s\s\s\s\s\s\sset\sserver\sftp.netscape.com\n\s\s\s\s\s\s\s\sset\sport\s\s\s12345\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\sif\s{[catch\s{\n\s\s\s\s\s\s\s\s\s\sset\ssock\s[socket\s-async\s$server\s$port]\n\s\s\s\s\s\s\s\s}\serr]}\s{\n\s\s\s\s\s\s\s\s\s\sputs\s"socket\s-async\sconnect\serror\s1\s\\"$err\\""\n\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s#\sdefine\sfileevent\scallback\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\sproc\sfirstWritable\s{\ssock\s}\s{\n\s\s\s\s\s\s\s\s\s\s#\sremove\swritable\sfileevent\shandler\n\s\s\s\s\s\s\s\s\s\sfileevent\s$sock\swritable\s{}\n\s\s\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s\s\s#find\sout\sif\sthe\sconnection\sworked\sby\stesting\sthe\s-peername\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s\s\sif\s[catch\s{fconfigure\s$sock\s-peername}\speerinfo]\s{\n\s\s\s\s\s\s\s\s\s\s\s\sclose\s$sock\n\s\s\s\s\s\s\s\s\s\s\s\sputs\s"socket\s-async\sconnect\serror\s2\s\\"$peerinfo\\""\n\s\s\s\s\s\s\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\s\s\s\s\sputs\s"socket\s-async\sconnect\sworked"\n\s\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s#\sset\sup\sfile\sevent\son\sthe\ssocket\sso\swe\sknow\n\s\s\s\s\s\s\s\s#\swhen\sit\sconnects\s(or\sfails\sto\sconnect)\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\sfileevent\s$sock\swritable\s"firstWritable\s$sock"\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s\n\s\s\s\s\n\s\s\s\sObservedBehavior:\n\s\s\s\s\s\s\s\sThe\swritable\sfileevent\scallback\sis\snever\striggered\sunder\sNT.\n\s\s\s\s\s\s\s\sThis\ssame\scode\sworks\sperfectly\sunder\sUnix\ssystems.\n\s\s\s\s\s\s\s\s\n\s\s\s\s\n\s\s\s\sDesiredBehavior:\n\s\s\s\s\s\s\s\sI\sneed\sto\sbe\sable\sto\stest\sto\ssee\sif\sthe\sasync\ssocket\n\s\s\s\s\s\s\s\sconnect\sworked\susing\sthe\swritable\sfileevent.\sThere\sis\n\s\s\s\s\s\s\s\ssimply\sno\sother\sway\sto\scheck\sthe\sstatus\sof\sthe\ssocket\n\s\s\s\s\s\s\s\swithout\sdoing\sa\sread\son\sthe\ssocket\sand\sdoing\sa\sread\n\s\s\s\s\s\s\s\son\sthe\ssocket\sis\snot\san\soption\sbecause\sthe\sprogram\n\s\s\s\s\s\s\s\scan\snot\sblock\sTk\sevents\sduring\sa\snetwork\soperation.\n\s\s\s\s\s\s\s\s\n\s\s\s\s\n\s\s\s\sComments:\n\s\s\s\s\s\s\s\sI\salso\stested\sthis\sunder\sTcl\s8.1b2\sand\sit\sdoes\snot\ssolve\n\s\s\s\s\s\s\s\sthis\sproblem\seither.\n\nPatch:\n1152d1151\n<\s\s\s\s\sif\s(infoPtr->flags\s&\sSOCKET_ASYNC_CONNECT)\s\n1389a1389\n>\s\n2003,2011c2003\n<\s\s\s\s\sif(infoPtr->flags\s&\sSOCKET_ASYNC_CONNECT)\s{\n<\s\s\s\s\s\s\s\s\s\s\sinfoPtr->flags\s&=\s~(SOCKET_ASYNC_CONNECT);\n<\sif\s(error\s!=\sERROR_SUCCESS)\s{\n<\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTclWinConvertWSAError(error);\n<\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sinfoPtr->lastError\s=\sTcl_GetErrno();\n<\s}\n<\sinfoPtr->readyEvents\s|=\sFD_WRITE;\n<\s\s\s\s\s}\n<\s\s\s\s\s\s\s\s\s\s\s\s\sinfoPtr->readyEvents\s|=\sevent;\n---\n>\s\s\s\s\sinfoPtr->readyEvents\s|=\sevent;\n\nPatchFiles:\nTclWinSock.c\n\n\n\n4/13/99\sredman\s-\sapplied\spatch\sexcept\sthe\sfirst\sline\sof\sthe\sdiff,\sseems\sto\sbe\sleft\sover\sfrom\ssomething\selse\sand\swas\snot\sincluded\swith\sMo's\spatch\son\sc.l.t.\s\sApplied\sfor\s8.0.6\sand\s8.1b3\n\n
J foundin final:\s8.0.5
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 63.\s(unused)
J title Async\ssocket\sconnect\shangs
J type Bug
K 218696ffffffffffffffffffffffffffffffffff
U nobody
Z ac295dcad18620b5cdb4b58f52545f8e