Changeset 3d07e1a1


Ignore:
Timestamp:
May 23, 2015 8:02:46 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4ea99b8
Parents:
195171f
Message:

I2CP: Revert part of prior checkin, prevented idle tunnel from opening;
(treat INIT as CLOSED) better fix to follow

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/I2PSessionImpl.java

    r195171f r3d07e1a1  
    825825    public boolean isClosed() {
    826826        synchronized (_stateLock) {
    827             return _state == State.CLOSED;
     827            return _state == State.CLOSED || _state == State.INIT;
    828828        }
    829829    }
     
    836836     */
    837837    void sendMessage(I2CPMessage message) throws I2PSessionException {
    838         if (isClosed()) {
    839             throw new I2PSessionException("Already closed");
    840         } else if (_queue != null) {
     838        synchronized (_stateLock) {
     839            if (_state == State.CLOSED)
     840                throw new I2PSessionException("Already closed");
     841            if (_state == State.INIT)
     842                throw new I2PSessionException("Not open, must call connect() first");
     843        }
     844        if (_queue != null) {
    841845            // internal
    842846            try {
     
    847851            }
    848852        } else if (_writer == null) {
    849             throw new I2PSessionException("Already closed");
     853            // race here
     854            throw new I2PSessionException("Already closed or not open");
    850855        } else {
    851856            _writer.addMessage(message);
  • router/java/src/net/i2p/router/RouterVersion.java

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