1、修改重连机制
This commit is contained in:
		| @ -414,7 +414,7 @@ func (wm *BinanceWebSocketManager) Stop() { | |||||||
|  |  | ||||||
| // 重连机制 | // 重连机制 | ||||||
| func (wm *BinanceWebSocketManager) handleReconnect(ctx context.Context) { | func (wm *BinanceWebSocketManager) handleReconnect(ctx context.Context) { | ||||||
| 	maxRetries := 5 // 最大重试次数 | 	maxRetries := 100 // 最大重试次数 | ||||||
| 	retryCount := 0 | 	retryCount := 0 | ||||||
|  |  | ||||||
| 	for { | 	for { | ||||||
| @ -455,6 +455,7 @@ func (wm *BinanceWebSocketManager) handleReconnect(ctx context.Context) { | |||||||
| 					continue | 					continue | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
|  | 				retryCount = 0 | ||||||
| 				return | 				return | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user