added log
This commit is contained in:
parent
a5ef148134
commit
1ee6bfc21a
@ -377,11 +377,13 @@ func (con Connection) StartServer(ctx *gin.Context) {
|
|||||||
for containerPort, portBindings := range containerData.NetworkSettings.Ports {
|
for containerPort, portBindings := range containerData.NetworkSettings.Ports {
|
||||||
for _, hostPort := range portBindings {
|
for _, hostPort := range portBindings {
|
||||||
number, proto := hostPort.HostPort, containerPort.Proto()
|
number, proto := hostPort.HostPort, containerPort.Proto()
|
||||||
_, err := fo.Write([]byte(fmt.Sprintf("%s|%s|%s|%s|%s\n", HostIP, number, "0.0.0.0", number, strings.ToUpper(proto))))
|
UPNPCommand := fmt.Sprintf("%s|%s|%s|%s|%s\n", HostIP, number, "0.0.0.0", number, strings.ToUpper(proto))
|
||||||
|
_, err := fo.Write([]byte(UPNPCommand))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.AbortWithError(500, err)
|
ctx.AbortWithError(500, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
log.Printf("Wrote command \"%s\" to %s", UPNPCommand, UPNPPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user