code: func (handle *ContextHandle) ReturnSession(session mPkcs11.SessionHandle) {
  
  	handle.lock.RLock()
  	defer handle.lock.RUnlock()
  
  	_, e := handle.ctx.GetSessionInfo(session)
  	if e != nil {
  		logger.Warnf("not returning session [%d], due to error [%s]. Discarding it", session, e)
  		e = handle.ctx.CloseSession(session)
  		if e != nil {
  			logger.Warn("unable to close session:", e)
  		}
  		return
  	}
  
  	select {
  	case handle.sessions <- session:
  		// returned session back to session cache
  	default:
  		// have plenty of sessions in cache, dropping
  		e = handle.ctx.CloseSession(session)
  		if e != nil {
  			logger.Warn("unable to close session: ", e)
  		}
  	}
  }
docs: //ReturnSession returns session back into the session pool
  //if pool is pull or session is invalid then discards session