Changeset 1091a28


Ignore:
Timestamp:
Sep 6, 2008 1:49:31 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9a2792e
Parents:
536f5d0
Message:
  • NTCP: Mark unreachable on outbound connection timeout
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/ntcp/EventPumper.java

    r536f5d0 r1091a28  
    423423            } else {
    424424                con.close();
     425                _transport.markUnreachable(con.getRemotePeer().calculateHash());
    425426                _context.statManager().addRateData("ntcp.connectFailedTimeout", 1, 0);
    426427            }
    427         } catch (IOException ioe) {
    428             if (_log.shouldLog(Log.DEBUG)) _log.debug("Error processing connection", ioe);
     428        } catch (IOException ioe) {   // this is the usual failure path for a timeout or connect refused
     429            if (_log.shouldLog(Log.WARN))
     430                _log.warn("Failed outbound connection to " + con.getRemotePeer().calculateHash(), ioe);
    429431            con.close();
     432            //_context.shitlist().shitlistRouter(con.getRemotePeer().calculateHash(), "Error connecting", NTCPTransport.STYLE);
     433            _transport.markUnreachable(con.getRemotePeer().calculateHash());
    430434            _context.statManager().addRateData("ntcp.connectFailedTimeoutIOE", 1, 0);
    431435        } catch (NoConnectionPendingException ncpe) {
    432             // ignore
    433         }
     436            // ignore
     437        }
    434438    }
    435439   
Note: See TracChangeset for help on using the changeset viewer.