Open kosomgua opened 1 year ago
Channel in BaseChannelPoolHandler throwing errors when ChannelReleased or ChannelAcquired called, cause in this code you trying to cast from IAttribute<IdleStateTimer> to IdleStateTimer type.
IAttribute<IdleStateTimer>
IdleStateTimer
public virtual void ChannelReleased(IChannel channel) { IdleStateTimer idls = (IdleStateTimer)channel.GetAttribute(IDLE_KEY); idls.setIdle(); } public virtual void ChannelAcquired(IChannel channel) { IdleStateTimer idls = (IdleStateTimer)channel.GetAttribute(IDLE_KEY); idls.setActive(); }
Should be changed to
public virtual void ChannelReleased(IChannel channel) { IdleStateTimer idls = channel.GetAttribute(IDLE_KEY).Get(); idls.setIdle(); } public virtual void ChannelAcquired(IChannel channel) { IdleStateTimer idls = channel.GetAttribute(IDLE_KEY).Get(); idls.setActive(); }
Channel in BaseChannelPoolHandler throwing errors when ChannelReleased or ChannelAcquired called, cause in this code you trying to cast from
IAttribute<IdleStateTimer>
toIdleStateTimer
type.Should be changed to