From 1df33ffacf98f09a33969a8c8ed4078247524d29 Mon Sep 17 00:00:00 2001
From: chenshijun <chenshijun@aiotlink.com>
Date: 星期五, 09 十月 2020 14:27:45 +0800
Subject: [PATCH] attach增加超时

---
 shmqueue.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/shmqueue.go b/shmqueue.go
index b116869..9c4f16c 100644
--- a/shmqueue.go
+++ b/shmqueue.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 	"fmt"
-	"github.com/gen2brain/shm"
+	shm "basic.com/valib/goshm.git"
 	"reflect"
 	"runtime"
 	"sync/atomic"
@@ -106,7 +106,7 @@
 func AttachQueue(ctx context.Context, key int) *EsQueueInfo {
 
 	var eqi EsQueueInfo
-	data, shmid := AttachRawShm(ctx, key)
+	data, shmid := AttachRawShmTimeout(ctx, key)
 	if shmid == -1 {
 		return nil
 	}

--
Gitblit v1.8.0