mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-10 06:16:53 -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,
|
||||
destination net.Destination,
|
||||
clientReader buf.Reader,
|
||||
clientWriter buf.Writer, dispatcher routing.Dispatcher) error {
|
||||
clientWriter buf.Writer, dispatcher routing.Dispatcher,
|
||||
) error {
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
timer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle)
|
||||
ctx = policy.ContextWithBufferPolicy(ctx, sessionPolicy.Buffer)
|
||||
|
@ -1,8 +1,9 @@
|
||||
package internet
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -48,7 +48,8 @@ func NewPacketAddrDispatcherCreator(ctx context.Context) PacketAddrDispatcherCre
|
||||
}
|
||||
|
||||
func (pdc *PacketAddrDispatcherCreator) NewPacketAddrDispatcher(
|
||||
dispatcher routing.Dispatcher, callback ResponseCallback) DispatcherI {
|
||||
dispatcher routing.Dispatcher, callback ResponseCallback,
|
||||
) DispatcherI {
|
||||
packetConn, _ := packetaddr.CreatePacketAddrConn(pdc.ctx, dispatcher, false)
|
||||
pd := &PacketAddrDispatcher{conn: packetConn, callback: callback, ctx: pdc.ctx}
|
||||
go pd.readWorker()
|
||||
|
Loading…
Reference in New Issue
Block a user