mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-27 12:24:14 +00:00
MUX: Refine and Fix some occasional problems (#4861)
Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
This commit is contained in:
parent
050f596e8f
commit
308f8a7459
4 changed files with 27 additions and 16 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
func TestSessionManagerAdd(t *testing.T) {
|
||||
m := NewSessionManager()
|
||||
|
||||
s := m.Allocate()
|
||||
s := m.Allocate(&ClientStrategy{})
|
||||
if s.ID != 1 {
|
||||
t.Error("id: ", s.ID)
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ func TestSessionManagerAdd(t *testing.T) {
|
|||
t.Error("size: ", m.Size())
|
||||
}
|
||||
|
||||
s = m.Allocate()
|
||||
s = m.Allocate(&ClientStrategy{})
|
||||
if s.ID != 2 {
|
||||
t.Error("id: ", s.ID)
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ func TestSessionManagerAdd(t *testing.T) {
|
|||
|
||||
func TestSessionManagerClose(t *testing.T) {
|
||||
m := NewSessionManager()
|
||||
s := m.Allocate()
|
||||
s := m.Allocate(&ClientStrategy{})
|
||||
|
||||
if m.CloseIfNoSession() {
|
||||
t.Error("able to close")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue