完善客户端与服务端注册,端口分配和协议交互逻辑
This commit is contained in:
@@ -47,7 +47,7 @@ func Offline(ctx context.Context, name string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func Assigned(ctx context.Context, id int32, edgeId int32, port int16) (err error) {
|
||||
func Assigned(ctx context.Context, id int32, edgeId int32, port uint16) (err error) {
|
||||
_, err = repeat(ctx, env.EndpointAssigned, map[string]any{
|
||||
"proxy": id,
|
||||
"edge": edgeId,
|
||||
@@ -85,7 +85,7 @@ func repeat(ctx context.Context, endpoint string, body any) (string, error) {
|
||||
default:
|
||||
}
|
||||
|
||||
slog.Warn("服务注册失败,五秒后重试", "err", err)
|
||||
slog.Warn("服务调用失败,五秒后重试", "err", err)
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user