On 15/06/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: olegk
>  Date: Sun Jun 15 05:50:39 2008
>  New Revision: 667954
>
>  URL: http://svn.apache.org/viewvc?rev=667954&view=rev
>  Log:
>  HTTPCORE-163: Fixed AbstractMultiworkerIOReactor#execute() to correctly 
> propagate the original I/O exception in case of an abnormal termination.
>  Contributed by Patrick Moore <patmoore at ieee.org>
>  Reviewed by Oleg Kalnichevski
>
>
>  Modified:
>     httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
>     
> httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
>
>  Modified: httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
>  URL: 
> http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?rev=667954&r1=667953&r2=667954&view=diff
>  
> ==============================================================================
>  --- httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
>  +++ httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Sun Jun 15 05:50:39 2008
>  @@ -10,18 +10,22 @@
>
>   All upstream projects dependent on HttpCore NIO are strongly advised to 
> upgrade.
>
>  +* [HTTPCORE-163] Fixed AbstractMultiworkerIOReactor#execute() to correctly
>  +  propagate the original I/O exception in case of an abnormal termination.
>  +  Contributed by Patrick Moore <patmoore at ieee.org>
>  +
>   * Changed behavior of IdentityDecoder & LengthDelimitedDecoder to throw
>    an IOException if data is attempted to be written beyond the length
>    of a FileChannel.  Previously would write nothing.
>  -  Sam Berlin <sberlin at apache.org>
>  +  Contributed by Sam Berlin <sberlin at apache.org>
>
>   * Fixed bug in LengthDelimitedDecoder & IdentityDecoder that caused 
> transfers
>    to a FileChannel to overwrite arbitrary parts of the file, if data was
>    buffered in SessionInputBuffer.
>  -  Sam Berlin <sberlin at apache.org>
>  +  Contributed by Sam Berlin <sberlin at apache.org>
>
>   * Fixed concurrency bug in the ThrottlingHttpServerHandler protocol handler.
>  -  Oleg Kalnichevski <olegk at apache.org>
>  +  Contributed by Oleg Kalnichevski <olegk at apache.org>
>
>   * Fixed bug in SharedInputBuffer that caused input events to be
>    incorrectly suspended.
>
>  Modified: 
> httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
>  URL: 
> http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java?rev=667954&r1=667953&r2=667954&view=diff
>  
> ==============================================================================
>  --- 
> httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
>  (original)
>  +++ 
> httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
>  Sun Jun 15 05:50:39 2008
>  @@ -142,6 +142,7 @@
>              this.threads[i].start();
>          }
>
>  +        boolean completed = false;
>          try {
>
>              for (;;) {
>  @@ -155,6 +156,7 @@
>                  }
>
>                  if (this.status.compareTo(IOReactorStatus.ACTIVE) > 0) {
>  +                    completed = true;
>                      break;
>                  }
>                  processEvents(readyCount);
>  @@ -180,11 +182,12 @@
>
>          } catch (ClosedSelectorException ex) {

The exception is still ignored - or am I missing something here?

I think there should at least be a comment to say why it can be ignored.

>          } finally {
>  -            // Shutdown
>              try {
>                  doShutdown();
>              } catch (IOException ex) {
>  -                throw new IOReactorException(ex.getMessage(), ex);
>  +                if (completed) {
>  +                    throw new IOReactorException(ex.getMessage(), ex);
>  +                }
>              }
>          }
>      }
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to