报错求解

zhengkeyu · · 872 次点击
<a href="/user/wuly" title="@wuly">@wuly</a> func Run() { for i := 1; i &lt;= 19000; i++ { conn, err := net.Dial(&#34;tcp&#34;, IP) if err != nil { fmt.Printf(&#34;Dial err,err = %v,Count = %v\n&#34;, err, i) panic(err) continue } robot := Robot{ conn: conn, Coins: 1000000, Uid: time.Now().UnixNano(), } robot.InitCoins() go robot.ReceiveMsg() //接收 time.Sleep(time.Nanosecond) fmt.Println(&#34;count: &#34;,i) } c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, os.Kill) &lt;-c }
#2
更多评论
好歹把源码贴出来啊。
#1