Skip to content

Commit

Permalink
Fix httpserver configuration in main.go
Browse files Browse the repository at this point in the history
The httpserver configuration in main.go was updated to use the targetCoAPServerCfg variable instead of the httpServerConfig variable. This change ensures that the correct configuration is used for the httpserver.

Signed-off-by: SammyOina <[email protected]>
  • Loading branch information
SammyOina committed Oct 17, 2023
1 parent 293a9c4 commit d80e29d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/coap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func main() {
counter, latency := internal.MakeMetrics(svcName, "api")
svc = api.MetricsMiddleware(svc, counter, latency)

hs := httpserver.New(ctx, cancel, svcName, httpServerConfig, api.MakeHandler(cfg.InstanceID), logger)
hs := httpserver.New(ctx, cancel, svcName, targetCoAPServerCfg, api.MakeHandler(cfg.InstanceID), logger)

cs := coapserver.New(ctx, cancel, svcName, targetCoAPServerCfg, api.MakeCoAPHandler(svc, logger), logger)

Expand All @@ -149,9 +149,9 @@ func main() {
return hs.Start()
})
g.Go(func() error {
if err := cs.Start(); err != nil {
return err
}
g.Go(func() error {
return cs.Start()
})
return proxyCoAP(ctx, coapServerConfig, logger, coap.NewHandler(nps, logger, tc))
})
g.Go(func() error {
Expand Down

0 comments on commit d80e29d

Please sign in to comment.