Changeset e86e428


Ignore:
Timestamp:
May 24, 2009 4:04:57 PM (11 years ago)
Author:
mkvore-commit <mkvore-commit@…>
Branches:
master
Children:
ab9fee2
Parents:
29489ad
Message:

SAMv1 and SAMv3 : logging some exception at INFO level

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • apps/sam/java/src/net/i2p/sam/SAMv1Handler.java

    r29489ad re86e428  
    108108                }
    109109
    110                 msg = DataHelper.readLine(getClientSocket().socket().getInputStream()).trim();
     110                SocketChannel clientSocketChannel = getClientSocket() ;
     111                if (clientSocketChannel == null) {
     112                        _log.info("Connection closed by client");
     113                        break;
     114                }
     115                if (clientSocketChannel.socket() == null) {
     116                        _log.info("Connection closed by client");
     117                        break;
     118                }
     119                java.io.InputStream is = clientSocketChannel.socket().getInputStream();
     120                if (is == null) {
     121                        _log.info("Connection closed by client");
     122                        break;
     123                }
     124                msg = DataHelper.readLine(is);
    111125                if (msg == null) {
    112                     _log.debug("Connection closed by client");
     126                    _log.info("Connection closed by client (line read : null)");
    113127                    break;
    114128                }
     129                msg = msg.trim();
    115130
    116131                if (_log.shouldLog(Log.DEBUG)) {
  • apps/sam/java/src/net/i2p/sam/SAMv3DatagramSession.java

    r29489ad re86e428  
    3939         */
    4040        public SAMv3DatagramSession(String nick)
    41         throws IOException, DataFormatException, I2PSessionException {
     41        throws IOException, DataFormatException, I2PSessionException, SAMException {
    4242               
    4343                super(SAMv3Handler.sSessionsHash.get(nick).getDest(),
     
    5050
    5151                SAMv3Handler.SessionRecord rec = SAMv3Handler.sSessionsHash.get(nick);
    52         if ( rec==null ) throw new InterruptedIOException() ;
     52        if ( rec==null ) throw new SAMException("Record disappeared for nickname : \""+nick+"\"") ;
    5353
    5454        this.handler = rec.getHandler();
  • apps/sam/java/src/net/i2p/sam/SAMv3Handler.java

    r29489ad re86e428  
    565565                        return writeString("SESSION STATUS RESULT=I2P_ERROR DESTINATION=" + dest + " MESSAGE=\"" + e.getMessage() + "\"\n");
    566566                } catch (SAMException e) {
    567                         _log.error("Unexpected SAM error", e);
     567                        _log.info("Funny SAM error", e);
    568568                        return writeString("SESSION STATUS RESULT=I2P_ERROR DESTINATION=" + dest + " MESSAGE=\"" + e.getMessage() + "\"\n");
    569569                } catch (IOException e) {
  • apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java

    r29489ad re86e428  
    198198                SAMv3Handler.SessionRecord rec = SAMv3Handler.sSessionsHash.get(nick);
    199199               
    200                 if ( rec==null ) throw new InterruptedIOException() ;
     200                if ( rec==null || i2ps==null ) throw new InterruptedIOException() ;
    201201               
    202202                        if (verbose)
  • history.txt

    r29489ad re86e428  
     12009-05-24 mkvore
     2    * SAM: logging some exceptions at INFO level instead of ERROR
     3
    142009-05-23 Mathiasdm
    25    * Router netDB:
  • router/java/src/net/i2p/router/RouterVersion.java

    r29489ad re86e428  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 3;
     21    public final static long BUILD = 4;
    2222    /** for example "-test" */
    2323    public final static String EXTRA = "";
Note: See TracChangeset for help on using the changeset viewer.