mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-29 04:37:06 -05:00
Style: formart code by gofumpt
This commit is contained in:
parent
2332513471
commit
552936674c
@ -245,7 +245,8 @@ func (s *Server) handleUDPPayload(ctx context.Context, clientReader *PacketReade
|
|||||||
func (s *Server) handleConnection(ctx context.Context, sessionPolicy policy.Session,
|
func (s *Server) handleConnection(ctx context.Context, sessionPolicy policy.Session,
|
||||||
destination net.Destination,
|
destination net.Destination,
|
||||||
clientReader buf.Reader,
|
clientReader buf.Reader,
|
||||||
clientWriter buf.Writer, dispatcher routing.Dispatcher) error {
|
clientWriter buf.Writer, dispatcher routing.Dispatcher,
|
||||||
|
) error {
|
||||||
ctx, cancel := context.WithCancel(ctx)
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle)
|
timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle)
|
||||||
ctx = policy.ContextWithBufferPolicy(ctx, sessionPolicy.Buffer)
|
ctx = policy.ContextWithBufferPolicy(ctx, sessionPolicy.Buffer)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package internet
|
package internet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.org/x/sys/windows"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -48,7 +48,8 @@ func NewPacketAddrDispatcherCreator(ctx context.Context) PacketAddrDispatcherCre
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pdc *PacketAddrDispatcherCreator) NewPacketAddrDispatcher(
|
func (pdc *PacketAddrDispatcherCreator) NewPacketAddrDispatcher(
|
||||||
dispatcher routing.Dispatcher, callback ResponseCallback) DispatcherI {
|
dispatcher routing.Dispatcher, callback ResponseCallback,
|
||||||
|
) DispatcherI {
|
||||||
packetConn, _ := packetaddr.CreatePacketAddrConn(pdc.ctx, dispatcher, false)
|
packetConn, _ := packetaddr.CreatePacketAddrConn(pdc.ctx, dispatcher, false)
|
||||||
pd := &PacketAddrDispatcher{conn: packetConn, callback: callback, ctx: pdc.ctx}
|
pd := &PacketAddrDispatcher{conn: packetConn, callback: callback, ctx: pdc.ctx}
|
||||||
go pd.readWorker()
|
go pd.readWorker()
|
||||||
|
Loading…
Reference in New Issue
Block a user