zhangmeng
2019-12-26 ba96922f40f82d12e9a5f4cfa4d887e78f460125
util/util.go
@@ -97,7 +97,6 @@
// create server
func NewSocketListen(mode int, url string, shm bool) (socket SocketContext, err error) {
   logger.Info("url is: ", url)
   ctx, cancel := context.WithCancel(context.Background())
   socket.Context = ctx
@@ -143,7 +142,7 @@
func MaybeRestartSocket(socket SocketContext, tryCnt *int) SocketContext {
   if socket.UseSHM {
      if *tryCnt > ShmMaxTryCount {
         logger.Info("SDK SEND SHM TRY :", ShmMaxTryCount, " RESTART IT")
         logger.Info("SDK SEND SHM TRY :", ShmMaxTryCount, " RESTART: ", socket.URL)
         socket.Sock.Close()
         newSocket, err := NewSocketListen(socket.Mode, socket.URL, socket.UseSHM)