Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Use socket from several fibers #30

moteus opened this Issue · 0 comments

1 participant


I wrote simle tcp proxy.
I have 2 fibers
Fiber1 read from backend and write to frontend
Fiber2 read from frontend and write to backend
Fiber1 create Fiber2 and pass frontend sockt.
All works. But on close all hungup.
This i think relevant example. If need i can post all proxy.

local client ="connect: ", client:connect(, BACKEND.port))
local fib = luv.fiber.create(function()
  LOG.trace("FIBER >>>", client:read())
LOG.trace("MAIN >>>", client:read())
fib:join()"close: ", client:close()) -- !!! this block forever

this output

2013-04-12 14:51:20 [INFO] connect:  userdata<>: 0093E7F8
2013-04-12 14:51:22 [TRACE] MAIN >>> some data
2013-04-12 14:51:22 [TRACE] FIBER >>> other data


f:\e\installs\lua\luv\luv-master\src\luv_stream.c: 287: luvL_stream_close: close stream
f:\e\installs\lua\luv\luv-master\src\luv_object.c: 24: luvL_object_close: object closing 009483B0, type: 12
f:\e\installs\lua\luv\luv-master\src\luv_cond.c: 9: luvL_cond_wait: SUSPEND state 0090F348(thread)
f:\e\installs\lua\luv\luv-master\src\luv_object.c: 16: luvL_object_close_cb: object closed 009483B0
f:\e\installs\lua\luv\luv-master\src\luv_cond.c: 19: luvL_cond_signal: READY state 00948FB0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.