handlersocket must be bound before calling select()
this is due to a rather odd (imo) decision in luasocket which says that the underlying socket (and therefore its file descriptor) isn't actually created until we call something that lets it work out whether ipv4 or ipv6
This commit is contained in:
parent
2388e4ca24
commit
b438a0fd17
1 changed files with 1 additions and 0 deletions
|
@ -301,6 +301,7 @@ function tftp:listen(rrq_generator_callback, wrq_generator_callback, hosts, port
|
|||
if request.opcode == 'WRQ' then requestsocket:sendto(self.ACK(0), host, port) end
|
||||
end
|
||||
local handlersocket = UDPSocket()
|
||||
handlersocket:bind("*", 0)
|
||||
local handler = self['handle_' .. request.opcode](self, handlersocket, host, port, generator, request.options)
|
||||
return {
|
||||
handler=handler,
|
||||
|
|
Loading…
Reference in a new issue