I think this is exactly what I needed. Playing with sockets (not LuaSocket only) is always tricky for me. Thanks, Sam, for your time.
If the socket was reset or shutdown by the server, select should indicate readable, if I recall correctly, and then when you read you will get an indication of error.