Skip to content

Commit 8c4e998

Browse files
authored
Update inbound.go
1 parent 6417c77 commit 8c4e998

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

proxy/vless/inbound/inbound.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ func (h *Handler) GetReverse(a *vless.MemoryAccount) (*Reverse, error) {
197197
if r == nil {
198198
picker, _ := reverse.NewStaticMuxPicker()
199199
r = &Reverse{tag: a.Reverse.Tag, picker: picker, client: &mux.ClientManager{Picker: picker}}
200-
runtime.Gosched() // prevents this outbound from becoming the default outbound
200+
for len(h.outboundHandlerManager.ListHandlers(h.ctx)) == 0 {
201+
runtime.Gosched() // prevents this outbound from becoming the default outbound
202+
}
201203
if err := h.outboundHandlerManager.AddHandler(h.ctx, r); err != nil {
202204
return nil, err
203205
}
@@ -547,9 +549,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
547549
switch request.Command {
548550
case protocol.RequestCommandUDP:
549551
return errors.New(requestAddons.Flow + " doesn't support UDP").AtWarning()
550-
case protocol.RequestCommandRvs:
552+
case protocol.RequestCommandMux, protocol.RequestCommandRvs:
551553
inbound.CanSpliceCopy = 3
552-
case protocol.RequestCommandMux:
553554
fallthrough // we will break Mux connections that contain TCP requests
554555
case protocol.RequestCommandTCP:
555556
var t reflect.Type

0 commit comments

Comments
 (0)