* Matthew Toseland <toad at amphibian.dyndns.org> [2008-01-28 14:22:27]:
> AFAICS this is unnecessary - msg will only be null if the queue is empty.
Yes, I've done the proper fix in 17326 and reverted it in r17402
>
> On Sunday 27 January 2008 19:49, nextgens at freenetproject.org wrote:
> > Author: nextgens
> > Date: 2008-01-27 19:49:59 +0000 (Sun, 27 Jan 2008)
> > New Revision: 17325
> >
> > Modified:
> > trunk/freenet/src/freenet/node/fcp/FCPConnectionOutputHandler.java
> > Log:
> > maybe fix #2019: Socket dies if first message is not ClientHello
> >
> > Modified: trunk/freenet/src/freenet/node/fcp/FCPConnectionOutputHandler.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/node/fcp/FCPConnectionOutputHandler.java
> 2008-01-27 16:57:20 UTC (rev 17324)
> > +++ trunk/freenet/src/freenet/node/fcp/FCPConnectionOutputHandler.java
> 2008-01-27 19:49:59 UTC (rev 17325)
> > @@ -44,12 +44,13 @@
> > private void realRun() throws IOException {
> > OutputStream os = new
> BufferedOutputStream(handler.sock.getOutputStream(), 4096);
> > while(true) {
> > - boolean closed;
> > + boolean closed, empty = false;
> > FCPMessage msg = null;
> > while(true) {
> > closed = handler.isClosed();
> > synchronized(outQueue) {
> > - if(outQueue.isEmpty()) {
> > + empty = outQueue.isEmpty();
> > + if(empty) {
> > if(closed) break;
> > os.flush();
> > try {
> > @@ -64,7 +65,7 @@
> > }
> > }
> > if(msg == null) {
> > - if(closed) {
> > + if(closed && empty) {
> > os.flush();
> > os.close();
> > return;
> >
> > _______________________________________________
> > cvs mailing list
> > cvs at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> >
> >
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080129/4aba6874/attachment.pgp>