mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
@@ -195,7 +195,9 @@ func (client *Client) connect() {
|
||||
reconnect:
|
||||
conn := client.dial()
|
||||
if conn == nil {
|
||||
client.Logger.Debugf(client.Ctx, "client dial failed")
|
||||
if !client.stopFlag {
|
||||
client.Logger.Debugf(client.Ctx, "client dial failed")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -311,6 +313,11 @@ func (client *Client) Stop() {
|
||||
client.Close()
|
||||
}
|
||||
|
||||
// IsStop 是否已停止
|
||||
func (client *Client) IsStop() bool {
|
||||
return client.stopFlag
|
||||
}
|
||||
|
||||
// Destroy 销毁当前连接
|
||||
func (client *Client) Destroy() {
|
||||
client.stopCron()
|
||||
|
||||
Reference in New Issue
Block a user