1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-04 23:40:26 +08:00

fix(wg): stop signal handling

This commit is contained in:
源文雨
2024-07-12 00:25:49 +09:00
parent 02ad99abb2
commit da6ffcc283
6 changed files with 26 additions and 11 deletions

View File

@@ -56,11 +56,12 @@ func (wg *WG) Run(srcport, destport uint16) {
wg.init(srcport, destport)
_, err := wg.me.ListenNIC()
if err != nil {
logrus.Panicln(err)
logrus.Warnln(err)
}
}
func (wg *WG) Stop() {
logrus.Warnln("[wg] stopping...")
_ = wg.me.Close()
}