aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/swarm.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/swarm.go')
-rw-r--r--swarm/swarm.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/swarm/swarm.go b/swarm/swarm.go
index 90360264e..431d57a70 100644
--- a/swarm/swarm.go
+++ b/swarm/swarm.go
@@ -388,10 +388,9 @@ func (self *Swarm) Start(srv *p2p.Server) error {
// start swarm http proxy server
if self.config.Port != "" {
addr := net.JoinHostPort(self.config.ListenAddr, self.config.Port)
- go httpapi.StartHTTPServer(self.api, &httpapi.ServerConfig{
- Addr: addr,
- CorsString: self.config.Cors,
- })
+ server := httpapi.NewServer(self.api, self.config.Cors)
+
+ go server.ListenAndServe(addr)
}
log.Debug(fmt.Sprintf("Swarm http proxy started on port: %v", self.config.Port))