From 040841db483f13622c78a535e2990fed6d7dd09b Mon Sep 17 00:00:00 2001 From: fatedier Date: Mon, 9 May 2016 00:15:31 +0800 Subject: [PATCH] cmd/frps/control: fix bug when frpc login failed --- src/frp/cmd/frps/control.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frp/cmd/frps/control.go b/src/frp/cmd/frps/control.go index c8c78271..7b8bed7a 100644 --- a/src/frp/cmd/frps/control.go +++ b/src/frp/cmd/frps/control.go @@ -93,6 +93,11 @@ func controlWorker(c *conn.Conn) { return } + // if login failed, just return + if ret > 0 { + return + } + // create a channel for sending messages msgSendChan := make(chan interface{}, 1024) go msgSender(s, c, msgSendChan)