This commit is contained in:
eson 2018-12-16 20:45:31 +08:00
parent e97e8c903a
commit 814df2777c
2 changed files with 2 additions and 9 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
pppoe_control

10
main.go
View File

@ -5,7 +5,6 @@ import (
"net"
"net/http"
"os"
"strconv"
"time"
)
@ -50,14 +49,7 @@ func checkTunExist() bool {
// CmdRestartHandler 接收到该命令就重启
func (worker *Worker) CmdRestartHandler(w http.ResponseWriter, r *http.Request) {
_tm := r.PostFormValue("tm")
if _tm != "" {
tm, err := strconv.ParseInt(_tm, 10, 64)
if !ErrorLog(err) {
log.Println(tm)
worker.DNET.SetRestart()
}
}
worker.DNET.SetRestart()
w.Write([]byte("ok"))
}