test: session lifecycle tests to reveal issues with sessions configuration.

This commit is contained in:
Houmgaor
2025-10-31 12:59:32 +01:00
parent a6cf550fdb
commit 2d3edcfd10
5 changed files with 2255 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ package channelserver
import (
"bytes"
"encoding/binary"
"io"
_config "erupe-ce/config"
"erupe-ce/network"
"sync"
@@ -29,8 +31,9 @@ func (m *MockCryptConn) SendPacket(data []byte) error {
}
func (m *MockCryptConn) ReadPacket() ([]byte, error) {
// Mock implementation for testing
return nil, nil
// Return EOF to simulate graceful disconnect
// This makes recvLoop() exit and call logoutPlayer()
return nil, io.EOF
}
func (m *MockCryptConn) GetSentPackets() [][]byte {