Fix missing omitempty for NTP server fields

This commit is contained in:
世界
2023-12-05 18:01:19 +08:00
parent 0ef268637e
commit cffc07579d
2 changed files with 4 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ type Service struct {
func NewService(ctx context.Context, router adapter.Router, logger logger.Logger, options option.NTPOptions) (*Service, error) {
ctx, cancel := common.ContextWithCancelCause(ctx)
server := options.ServerOptions.Build()
server := M.ParseSocksaddrHostPort(options.Server, options.ServerPort)
if server.Port == 0 {
server.Port = 123
}