Commit 78b9cc90 authored by szh's avatar szh

up

parent 02b2495d
...@@ -75,8 +75,6 @@ func broadcast() { ...@@ -75,8 +75,6 @@ func broadcast() {
if ok { if ok {
send = pai.Serial send = pai.Serial
} }
for {
//ip 会变化 //ip 会变化
ip,err := util.GetLocalIP() ip,err := util.GetLocalIP()
if err != nil { if err != nil {
...@@ -97,9 +95,11 @@ func broadcast() { ...@@ -97,9 +95,11 @@ func broadcast() {
if err != nil { if err != nil {
log.Println(err.Error()) log.Println(err.Error())
} }
for {
_, err = conn.Write([]byte(send)) _, err = conn.Write([]byte(send))
if err != nil{ if err != nil{
fmt.Println(err) panic(err)
} }
log.Println(send) log.Println(send)
time.Sleep(time.Second) time.Sleep(time.Second)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment