Hi, I'm not sure if it is a good idea to ignore an Exception in CancelDnsLookup without some precaution. What happens i.e. if the error code was 10037 "Operation already in progress"?
-- Arno Garrels Fastream Technologies wrote: > This is how it is called from httpprot.pas: > > if bFlag then > try > FCtrlSocket.CancelDnsLookup; > except > { Ignore any exception } > end; > > > which also confirms the fix. > > Regards, > > SZ > On Sun, Mar 20, 2011 at 4:08 PM, Fastream Technologies > <ga...@fastream.com>wrote: > >> My fix seems to work on our web proxy server! >> >> If nobody has any objection, Arno or Francois could you apply this >> to SVN? >> >> Best Regards, >> >> SubZero >> On Sun, Mar 20, 2011 at 3:15 PM, Fastream Technologies >> <ga...@fastream.com >>> wrote: >> >>> Hello, >>> >>> procedure TCustomWSocket.InternalAbort(ErrCode : Word); >>> begin >>> CancelDnsLookup; // ==> may raise exception due to Winsock error >>> 11002! >>> DeleteBufferedData; >>> { Be sure to close as fast as possible (abortive close) } >>> if (State = wsConnected) and (FProto = IPPROTO_TCP) then begin >>> LingerOnOff := wsLingerOff; >>> SetLingerOption; >>> end; >>> InternalClose(FALSE, ErrCode); >>> end; >>> I propose to surround the canceldnslookup with a try/catch. Any >>> objection? >>> >>> Regards, >>> >>> SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be