User: hiram   
  Date: 00/12/29 13:17:11

  Modified:    src/java/org/spydermq/distributed/server
                        ConnectionReceiverOIL.java
  Log:
  Bug fix: It was throwing an exception when the connection was close()ed
  
  Revision  Changes    Path
  1.14      +15 -0     
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java
  
  Index: ConnectionReceiverOIL.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ConnectionReceiverOIL.java        2000/12/23 15:48:20     1.13
  +++ ConnectionReceiverOIL.java        2000/12/29 21:17:10     1.14
  @@ -42,7 +42,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.13 $
  + *   @version $Revision: 1.14 $
    */
   public class ConnectionReceiverOIL implements Runnable, ConnectionReceiverSetup {
        // Attributes ----------------------------------------------------
  @@ -98,6 +98,9 @@
                        try {
                                code = in.readByte();
                        } catch (IOException e) {
  +                             if (closed)
  +                                     break;
  +                                     
                                failure("Command read", e);
                                e.printStackTrace();
                                return;
  @@ -130,6 +133,8 @@
                                }
   
                        } catch (Exception e) {
  +                             if (closed)
  +                                     break;
   
                                try {
                                        if (e instanceof NoReceiverException) {
  @@ -147,6 +152,16 @@
   
                        }
   
  +             }
  +             
  +             try {
  +                     Log.log("Closing receiver connections.");
  +                     out.close();
  +                     in.close();
  +             } catch (IOException e) {
  +                     Log.log("Error whle closing receiver connections ");
  +                     Log.log(e);
  +                     return;
                }
        }
   
  
  
  

Reply via email to