feat: add error log for create endpoint

This commit is contained in:
AkinoKaede
2023-10-22 22:44:35 +01:00
committed by Shelikhoo
parent 98463db088
commit 7a42380599
2 changed files with 1 additions and 5 deletions
-2
View File
@@ -38,8 +38,6 @@ type TCPHandler struct {
dispatcher routing.Dispatcher
policyManager policy.Manager
config *Config
stack *stack.Stack
}
func SetTCPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyManager policy.Manager, config *Config) StackOption {
+1 -3
View File
@@ -22,8 +22,6 @@ type UDPHandler struct {
dispatcher routing.Dispatcher
policyManager policy.Manager
config *Config
stack *stack.Stack
}
type udpConn struct {
@@ -41,7 +39,7 @@ func SetUDPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyMan
wg := new(waiter.Queue)
linkedEndpoint, err := r.CreateEndpoint(wg)
if err != nil {
// TODO: log
newError("failed to create endpoint: ", err).WriteToLog(session.ExportIDToError(ctx))
return
}