修改节点心跳发送失败逻辑,现在会直接退出;完善数据通道连接超时的错误处理
This commit is contained in:
@@ -31,8 +31,8 @@ func ReadBuffer(reader io.Reader, size int) ([]byte, error) {
|
||||
|
||||
// Close 关闭对象,传入值绝对不能为 nil
|
||||
func Close(v any) {
|
||||
if v, ok := v.(io.Closer); ok {
|
||||
err := v.Close()
|
||||
if c, ok := v.(io.Closer); ok {
|
||||
err := c.Close()
|
||||
if err != nil {
|
||||
var logger = slog.Default()
|
||||
_, file, line, ok := runtime.Caller(1)
|
||||
|
||||
Reference in New Issue
Block a user