🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #166

Re: Netscape socket continues blocking after close()

#166
From: Evil Doona Bandit
Date: Tue, 19 Dec 2000 11:31
71 lines
3574 bytes
Hi Paul, thanks for your response.

Unfortunately I'm still having no luck with the first thread snapping
out of it and realising that the socket has actually been closed. The
notify() call was worth a try but Netscape didn't want to cooperate.
The thing is, there are no locks being held on the socket object, and
no opportunity for deadlock of any kind - thread 2 closes the socket
and returns to being a GUI event handler thread, which leaves the
socket reading (blocking) thread as the last remaining user thread. It
is apparently still twiddling its thumbs, waiting for that next input
from the stream. It's pretty weird..

Anyway, I thought that this would be a fairly common operation in a
client/server situation, so surely others would have encountered this
same issue with Netscape..?

Thanks again for the suggestion Paul, I'll keep fiddling around with it
to see what can be done. If you have any more ideas, please let me know!

Thanks,

EDB

In article <WW1%5.160574$e5.123342@newsfeeds.bigpond.com>,
  "Paul Murray" <pmurray@nospam.bigpond.com> wrote:
> Try doing a notify() on the socket - may or may not work, depending
on how
> blocking is implemented.
>
> --
> --------------------------------------------------------------
> Repent! Quit your job! Slack off!
> http://www.users.bigpond.com/pmurray
> ICQ: 26066755
> "Evil Doona Bandit" <evildoonabandit@my-deja.com> wrote in message
> news:91hkvn$5t2$1@nnrp1.deja.com...
> > Hi,
> >
> > A small problem that I've encountered with testing an applet in
> > Netscape:
> >
> > Thread 1 blocks on the readObject() call to a (client) Socket's
input
> > stream.
> >
> > Thread 2 closes the socket, which should hopefully force Thread 2 to
> > throw an IOException, but doesn't. The socket has been closed, but
> > Thread 1 keeps blocking in Netscape v4.70, even though in Sun's
> > appletviewer and IE v5.5 it is well behaved and throws the
exception.
> >
> > Has anyone else had the same problem with Netscape? Any ideas? I
would
> > rather not change the code to put in a Socket timeout, and then
have to
> > regularly check a flag to see if the socket is due to be closed,
etc.
> >
> > Thanks in advance!
> >
> > EDB
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
>


Sent via Deja.com
http://www.deja.com/
Technical Details
Message-ID: <91ngv3$jep$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!feed2.onemain.com!feed1.onemain.com!xfer13.netnews.com!netnews.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
References: <91hkvn$5t2$1@nnrp1.deja.com> <WW1%5.160574$e5.123342@newsfeeds.bigpond.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,a3545717b2d82fe5
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 113ae9,a3545717b2d82fe5
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10a146,a3545717b2d82fe5
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2000-12-19 03:40:33 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!feed2.onemain.com!feed1.onemain.com!xfer13.netnews.com!netnews.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
From: Evil Doona Bandit <evildoonabandit@my-deja.com>
Newsgroups: comp.lang.java.programmer,comp.lang.java.help,aus.computers.java
Subject: Re: Netscape socket continues blocking after close()
Date: Tue, 19 Dec 2000 11:31:46 GMT
Organization: Deja.com
Lines: 71
Message-ID: <91ngv3$jep$1@nnrp1.deja.com>
References: <91hkvn$5t2$1@nnrp1.deja.com> <WW1%5.160574$e5.123342@newsfeeds.bigpond.com>
NNTP-Posting-Host: 134.148.7.156
X-Article-Creation-Date: Tue Dec 19 11:31:46 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
X-Http-Proxy: 1.1 x64.deja.com:80 (Squid/1.1.22) for client 134.148.7.156
X-MyDeja-Info: XMYDJUIDevildoonabandit