* Matthew Toseland <[EMAIL PROTECTED]> [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, [EMAIL PROTECTED] 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
> > [EMAIL PROTECTED]
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> >
> >
> _______________________________________________
> Devl mailing list
> [email protected]
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
signature.asc
Description: Digital signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
