1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Style: formart code by gofumpt

This commit is contained in:
秋のかえで 2022-04-07 00:06:08 +08:00
parent 2332513471
commit 552936674c
No known key found for this signature in database
GPG Key ID: E343534293081E5D
3 changed files with 6 additions and 3 deletions

View File

@ -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)

View File

@ -1,8 +1,9 @@
package internet
import (
"golang.org/x/sys/windows"
"syscall"
"golang.org/x/sys/windows"
)
const (

View File

@ -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()