late set of cmd id

pull/73/head
v2ray 2016-01-25 00:43:55 +01:00
parent b6e23de0d3
commit 9f6822411b
1 changed files with 2 additions and 2 deletions

View File

@ -15,17 +15,17 @@ func (this *VMessInboundHandler) generateCommand(buffer *alloc.Buffer) {
defer commandBytes.Release()
if this.features != nil && this.features.Detour != nil {
cmd = byte(1)
tag := this.features.Detour.ToTag
if this.space.HasInboundHandlerManager() {
handlerManager := this.space.InboundHandlerManager()
handler, availableMin := handlerManager.GetHandler(tag)
inboundHandler, ok := handler.(*VMessInboundHandler)
if ok {
if availableMin > 255 {
availableMin = 255
}
cmd = byte(1)
log.Info("VMessIn: Pick detour handler for port ", inboundHandler.Port(), " for ", availableMin, " minutes.")
user := inboundHandler.GetUser()
saCmd := &command.SwitchAccount{