Revert "use tcp v4"

This reverts commit 694afa65a5.
This commit is contained in:
NatureFreshMilk 2019-06-17 06:51:38 +02:00
parent dcaab6e4d3
commit cd406baec5

View File

@ -3,7 +3,6 @@ package web
import (
"mapserver/app"
"mapserver/vfs"
"net"
"net/http"
"strconv"
@ -48,12 +47,7 @@ func Serve(ctx *app.App) {
mux.Handle("/api/mapblock/", &MapblockHandler{ctx: ctx})
}
server := &http.Server{Handler: mux}
l, err := net.Listen("tcp4", ":"+strconv.Itoa(ctx.Config.Port))
if err != nil {
panic(err)
}
err = server.Serve(l)
err := http.ListenAndServe(":"+strconv.Itoa(ctx.Config.Port), mux)
if err != nil {
panic(err)
}