Hi Pieter, On Sun, May 06, 2018 at 12:00:14AM +0200, PiBa-NL wrote: > The parameters like server-address, port and timeout should be set before > process_stream task is called to avoid the stream being 'closed' before it > got initialized properly. This is most clearly visible when running with > tune.lua.forced-yield=1.. So scheduling the task should not be done when > creating the lua socket, but when connect is called. The error > "socket: not yet initialised, you can't set timeouts." would then appear. > > Below code for example also shows this issue, as the sleep will > yield the lua code: > local con = core.tcp() > core.sleep(1) > con:settimeout(10)
It seems to make sense indeed. I'll let Thierry check as he's the one who really knows if there's a possible impact behind this. Thanks, Willy

