diff --git a/src/services/game/manager.rs b/src/services/game/manager.rs
index 7aecb55..4027fbd 100644
--- a/src/services/game/manager.rs
+++ b/src/services/game/manager.rs
@@ -170,7 +170,7 @@ impl GameManager {
};
// Allocate tunnel if supported by client
- if let Some(association) = session.association {
+ if let Some(association) = session.data.get_association() {
self.tunnel_service
.associate_pool(association, game_id, index as u8);
self.udp_tunnel_service
diff --git a/src/session/data.rs b/src/session/data.rs
index 88a64b2..0073475 100644
--- a/src/session/data.rs
+++ b/src/session/data.rs
@@ -1,4 +1,4 @@
-use std::sync::Arc;
+use std::{net::Ipv4Addr, sync::Arc};
use parking_lot::{Mutex, MutexGuard};
use serde::Serialize;
@@ -7,7 +7,7 @@ use crate::{
database::entities::Player,
services::{
game::{GameRef, WeakGameRef},
- sessions::SessionPlayerAssociation,
+ sessions::{AssociationId, SessionPlayerAssociation},
},
utils::{
components::user_sessions,
@@ -29,23 +29,46 @@ use super::{
SessionNotifyHandle,
};
-#[derive(Default)]
pub struct SessionData {
- inner: Mutex