diff options
author | Matus Mrekaj <matus.mrekaj@pantheon.tech> | 2019-10-22 15:05:39 +0200 |
---|---|---|
committer | Matus Mrekaj <matus.mrekaj@pantheon.tech> | 2019-10-30 14:42:35 +0100 |
commit | 58601b470bbd4e5ef534fed83511aa5a7f1c2d1e (patch) | |
tree | 1c0c1176567d66e1b7be45c51f445dd5baa28dee /cmd/vpp-proxy | |
parent | cc80dbcaaaca8bf1b6042fead850d456cf589a4e (diff) |
fix data races in proxy server
Signed-off-by: Matus Mrekaj <matus.mrekaj@pantheon.tech>
Change-Id: I932d560548ee816e28683243a7318a2a7fbbb24a
Diffstat (limited to 'cmd/vpp-proxy')
-rw-r--r-- | cmd/vpp-proxy/main.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/vpp-proxy/main.go b/cmd/vpp-proxy/main.go index de1b7b4..5221218 100644 --- a/cmd/vpp-proxy/main.go +++ b/cmd/vpp-proxy/main.go @@ -120,7 +120,10 @@ func runClient() { } func runServer() { - p := proxy.NewServer() + p, err := proxy.NewServer() + if err != nil { + log.Fatalln(err) + } statsAdapter := statsclient.NewStatsClient(*statsSocket) binapiAdapter := socketclient.NewVppClient(*binapiSocket) @@ -135,5 +138,7 @@ func runServer() { } defer p.DisconnectBinapi() - p.ListenAndServe(*proxyAddr) + if err := p.ListenAndServe(*proxyAddr); err != nil { + log.Fatalln(err) + } } |