Changeset ad8ce95


Ignore:
Timestamp:
Feb 20, 2012 7:34:13 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
409bc7fd
Parents:
a15e4c6
Message:

Streaming: Fix race NPE (thx echelon)

Files:
4 edited

Legend:

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

    ra15e4c6 rad8ce95  
    549549    void disconnectComplete() {
    550550        _connected = false;
    551         if (_socket != null)
    552             _socket.destroy();
    553         _socket = null;
     551        I2PSocketFull s = _socket;
     552        if (s != null) {
     553            s.destroy2();
     554            _socket = null;
     555        }
    554556        if (_outputStream != null)
    555557            _outputStream.destroy();
  • apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java

    ra15e4c6 rad8ce95  
    132132    void destroy() {
    133133        Connection c = _connection;
     134        destroy2();
     135        if (c != null)
     136            c.disconnectComplete();
     137    }
     138   
     139    /**
     140     *  Call from Connection.disconnectComplete()
     141     *  instead of destroy() so we don't loop
     142     *  @since 0.8.13
     143     */
     144    void destroy2() {
    134145        _connection = null;
    135146        _listener = null;
    136         if (c != null)
    137             c.disconnectComplete();
    138147    }
    139148   
  • history.txt

    ra15e4c6 rad8ce95  
     12012-02-20 zzz
     2  * Streaming: Fix race NPE (thx echelon)
     3
    142012-02-17 zzz
    25  * i2psnark: Escape fixes
  • router/java/src/net/i2p/router/RouterVersion.java

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