func (session *Session) Expired() bool {
	now := time.Now()
	threshold := session.config.PingInterval + session.config.PingTimeout

	return session.closed || session.lastPingTime.Add(threshold).Before(now)
}
// Expired check if session is closed or last ping was not before (ping interval + ping timeout)
Expired check if session is closed or last ping was not before (ping interval + ping timeout)
// Expired check if session is closed or last ping was not before ( ping interval + ping timeout )
func (session *Session) Expired() bool {
	now := time.Now()
	threshold := session.config.PingInterval + session.config.PingTimeout
	return session.closed || session.lastPingTime.Add(threshold).Before(now)
}
func ( session * Session ) Expired ( ) bool { now := time . Now ( ) threshold := session . config . PingInterval + session . config . PingTimeout return session . closed || session . lastPingTime . Add ( threshold ) . Before ( now ) }
Expired check if session is closed or last ping was not before (ping interval + ping timeout)
Expired check if session is closed or last ping was not before ( ping interval + ping timeout )