Skip to content

Commit 7565a9c

Browse files
committed
proxy forgets packages if debuggee connects
this might fix #344 when lua-debug wait for a conencting debuggee, after the connection is accepted nothing happens. lua-debug should send queued packages in that case, as it does in the other case where lua-debug connects to the debuggee
1 parent 7fdac73 commit 7565a9c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extension/script/common/socket.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ return function (param)
8686
server = assert(net.listen(t.protocol, t.address, t.port))
8787
function server:on_accepted(new_s)
8888
return init_session(new_s)
89+
local ok = init_session(s)
90+
assert(ok)
91+
if writebuf ~= '' then
92+
s:write(writebuf)
93+
writebuf = ''
94+
end
8995
end
9096
else
9197
return

0 commit comments

Comments
 (0)