From 59a06c74fe070cfa6ab839e3c93ab5207f04bdaf Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 4 Jan 2021 01:43:30 +0800 Subject: [PATCH] =?utf8?q?=E8=BE=93=E5=85=A5=E6=88=BF=E5=8F=B7=E6=97=B6?= =?utf8?q?=E5=8F=AF=E4=BB=A5=E6=8C=89ctrl+c=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bili_danmu.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bili_danmu.go b/bili_danmu.go index a110772..242a602 100644 --- a/bili_danmu.go +++ b/bili_danmu.go @@ -22,9 +22,7 @@ func Demo(roomid ...int) { //ctrl+c退出 interrupt := make(chan os.Signal, 1) - signal.Notify(interrupt, os.Interrupt) - - + { var groomid = flag.Int("r", 0, "roomid") var live_qn = flag.String("q", "0", "qn") @@ -87,6 +85,9 @@ func Demo(roomid ...int) { <-change_room_chan + //ctrl+c退出 + signal.Notify(interrupt, os.Interrupt) + for !exit_sign { //获取cookies { -- 2.39.2