Changeset 6f5f4d1


Ignore:
Timestamp:
Jul 4, 2013 2:54:46 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b4780d1
Parents:
b9a5dd4
Message:
  • Streaming:
    • Don't stop timers when session disconnects (tickets #644, #810)
    • Throw exception on attempt to use destroyed socket manager
    • Clear TCBShare cache when stopped
    • Javadocs
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • apps/streaming/java/src/net/i2p/client/streaming/Connection.java

    rb9a5dd4 r6f5f4d1  
    991991                default:
    992992                    if (_log.shouldLog(Log.WARN))
    993                         _log.warn("Closing connection due to inactivity");
     993                        _log.warn("Closing (inactivity) " + toString());
    994994                    if (_log.shouldLog(Log.DEBUG)) {
    995995                        StringBuilder buf = new StringBuilder(128);
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java

    rb9a5dd4 r6f5f4d1  
    485485     * Don't bother sending close packets.
    486486     *
     487     * CAN continue to use the manager.
    487488     */
    488489    public void disconnectAllHard() {
     
    492493            iter.remove();
    493494        }
     495    }
     496   
     497    /**
     498     * Kill all connections and the timers.
     499     * Don't bother sending close packets.
     500     *
     501     * CANNOT continue to use the manager or restart.
     502     *
     503     * @since 0.9.7
     504     */
     505    public void shutdown() {
     506        disconnectAllHard();
    494507        _tcbShare.stop();
    495508        _timer.stop();
  • apps/streaming/java/src/net/i2p/client/streaming/I2PSocketManagerFull.java

    rb9a5dd4 r6f5f4d1  
    3939    private static int __managerId = 0;
    4040    private final ConnectionManager _connectionManager;
     41    private volatile boolean _isDestroyed;
    4142   
    4243    /**
     
    201202
    202203    private void verifySession() throws I2PException {
     204        if (_isDestroyed)
     205            throw new I2PException("destroyed");
    203206        if (!_connectionManager.getSession().isClosed())
    204207            return;
     
    305308    /**
    306309     * Destroy the socket manager, freeing all the associated resources.  This
    307      * method will block untill all the managed sockets are closed.
    308      *
     310     * method will block until all the managed sockets are closed.
     311     *
     312     * CANNOT be restarted.
    309313     */
    310314    public void destroySocketManager() {
     315        _isDestroyed = true;
    311316        _connectionManager.setAllowIncomingConnections(false);
    312         _connectionManager.disconnectAllHard();
     317        _connectionManager.shutdown();
    313318        // should we destroy the _session too?
    314319        // yes, since the old lib did (and SAM wants it to, and i dont know why not)
  • apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java

    rb9a5dd4 r6f5f4d1  
    4242    }
    4343
     44    /**
     45     *  Cannot be restarted.
     46     */
    4447    public void stop() {
    4548        _cleaner.cancel();
     49        _cache.clear();
    4650    }
    4751
  • core/java/src/net/i2p/util/SimpleTimer2.java

    rb9a5dd4 r6f5f4d1  
    8888     * Stops the SimpleTimer.
    8989     * Subsequent executions should not throw a RejectedExecutionException.
     90     * Cannot be restarted.
    9091     */
    9192    public void stop() {
  • history.txt

    rb9a5dd4 r6f5f4d1  
     12013-07-04 zzz
     2 * Streaming:
     3   - Don't stop timers when session disconnects (tickets #644, #810)
     4   - Throw exception on attempt to use destroyed socket manager
     5
    162013-07-03 zzz
    27 * Console: Hide dead tunnel pools on /tunnels
  • router/java/src/net/i2p/router/RouterVersion.java

    rb9a5dd4 r6f5f4d1  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 16;
     21    public final static long BUILD = 17;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.