mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 01:17:30 -05:00
minor fix
This commit is contained in:
parent
d8c6102638
commit
d623b1809d
@ -31,6 +31,8 @@ func TestSwitchAccount(t *testing.T) {
|
||||
cmd.Unmarshal(buffer.Bytes())
|
||||
sa2, ok := cmd.(*SwitchAccount)
|
||||
assert.Bool(ok).IsTrue()
|
||||
assert.Pointer(sa.Host).IsNil()
|
||||
assert.Pointer(sa2.Host).IsNil()
|
||||
netassert.Port(sa.Port).Equals(sa2.Port)
|
||||
assert.String(sa.ID).Equals(sa2.ID.String())
|
||||
assert.Uint16(sa.AlterIds.Value()).Equals(sa2.AlterIds.Value())
|
||||
|
@ -16,11 +16,10 @@ func (this *VMessInboundHandler) generateCommand(buffer *alloc.Buffer) {
|
||||
tag := this.features.Detour.ToTag
|
||||
if this.space.HasInboundHandlerManager() {
|
||||
handlerManager := this.space.InboundHandlerManager()
|
||||
handler, availableSec := handlerManager.GetHandler(tag)
|
||||
handler, availableMin := handlerManager.GetHandler(tag)
|
||||
inboundHandler, ok := handler.(*VMessInboundHandler)
|
||||
if ok {
|
||||
user := inboundHandler.GetUser()
|
||||
availableMin := availableSec / 60
|
||||
if availableMin > 255 {
|
||||
availableMin = 255
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user