conn=net.createConnection(net.TCP,0)
Should I somehow dispose or delete it each time? I'm not even sure how that might be done...
I'll just close admitting I'm a no I - my whole problem was that I didn't realize that Lua is event driven and all functions seem to be threaded.
I put in some semaphores and my code is now doing what I hoped for.
Thanks for your help & patience