From 814df2777c799f6f0906d1a6ae0f97287dc91e51 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Sun, 16 Dec 2018 20:45:31 +0800 Subject: [PATCH] v1.0.1 --- .gitignore | 1 + main.go | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9e6641 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pppoe_control diff --git a/main.go b/main.go index 94aca46..bb8e5a3 100644 --- a/main.go +++ b/main.go @@ -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")) }