directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Horia Muntean <horia.munt...@gmail.com>
Subject Session Idle time not working
Date Wed, 08 Jun 2005 10:00:30 GMT
Hello,

I was trying to configure a session to close itself in case of idle
time expiration. I am using mina-0.7.2.jar (grabbed from
http://cvs.apache.org/repository/directory-network/jars/) on a WinXP
box. The code follows:
<code>
    public void sessionCreated(ProtocolSession session) throws Exception {
        logger.debug("session created");
        session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);
        session.getConfig().setWriteTimeout(5);
    }

    public void sessionIdle(ProtocolSession session, IdleStatus arg1)
throws Exception {
        logger.debug("session idle");
        session.close();
    }
</code>

Then I have just opened a telnet connection to the server and waited
for the connection go be cut off by the server but notging happens.
BTW, when I popup my telnet connection, sessionCreated and
sessionOpened are getting called on the server side.

Regards,
Horia

Mime
View raw message