lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello!  LuaSocket looks great, but I'm having a bit of trouble
with it and I was wondering if I was alone... this is on
linux/x86 (glibc 2.2.4, kernel 2.4.25, lua 5.0.2):

Running testclnt/testsrvr:

----------------------------------------------
LuaSocket Test Procedures
----------------------------------------------
attempting control connection...
connected!
----------------------------------------------
testing: method registration
----------------------------------------------
tcp{master} methods are ok
udp{unconnected} methods are ok
----------------------------------------------
testing: select function
----------------------------------------------
both nil: ok
closed sockets: ok
invalid input: ok
----------------------------------------------
testing: connect function
----------------------------------------------
connect with timeout (if it hangs, it failed!): ok
attempting data connection...

There it just hangs (indefinitely as far as I can see).
Tracing through, it is hanging in the control:recieve() call of
testclnt's remote() function, and remote() was called from
reconnect().  Meanwhile I don't think that testsrvr.lua has ever
returned from its initial server:accept() call.

I'm having a possibly-related problem with the most basic
invocations of ftp.get() and http.request(): they also hang,
fairly early in the connection, though they do timeout as a
result.  http.request() is the one I have investigated the most
(I assume ftp.get() is just the same problem); it:
* correctly knows when it's pointed at a bad hostname, and returns.
* correctly knows when it's pointed at a bad port ('connection
refused') and returns.
* hangs (well, timeouts) when it should get a successful
connection.  Apache server doesn't register a connection in its
log (so we didn't get as far as issuing a GET, I think).

I am doing one maybe-unusual thing: I have made minor tweaks to
statically link and initialise LuaSocket in my binary, but I don't
expect that to have affected such a 'deep' error (but then, computers
are strange).

Was wondering how LuaSocket is for other folk, or if anyone has
anything I could try.

Thanks,
--Adam