[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LuaSocket is fine on OpenBSD. Bug was in test.
- From: Diego Nehab <diego@...>
- Date: Thu, 13 Apr 2006 17:11:55 -0400 (EDT)
There was a bug in the test submitted by the user:
for src, _ in ipairs(readable) do
The index 'src' is valid only for table 'readable'. Not for table
'receive_sockets'. In fact, there is no need to use the index.
for _, udp in ipairs(readable) do
This is a simpler alternative.
The reason the code worked in some systems is that when all
sockets are readable simultaneously, the indices on both
tables end up matching so the bug goes unnoticed.