** Changed in: tarantool
   Importance: Undecided => Medium

** Changed in: tarantool
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Tarantool
Development Team, which is subscribed to tarantool.
https://bugs.launchpad.net/bugs/1209189

Title:
  Using box.socket:recvfrom on udp socket causing 100% CPU utilization
  instead of idle

Status in Tarantool - an efficient in-memory data store:
  Fix Released

Bug description:
  init.lua:
  gr = { port = 22003 }

  function gr.udpserver()
      box.fiber.detach()
      box.fiber.name("gr.udpserver")
      while true do
          local msg, status, host, port = gr.udpsrv:recvfrom(1024)
          if (msg ~= '') then
              print(msg)
          else
              print("not a message ", status);
          end
      end
  end

  
  if (gr.udpsrv == nil) then
      local sock = box.socket.udp()
      sock:bind('0.0.0.0', gr.port, 1);
      sock:listen()
      print("bound to udp port ",gr.port)
      local f = box.fiber.create(gr.udpserver)
      box.fiber.resume(f)
      gr.udpsrv = sock;
  end

To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1209189/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to