Skip to content

Timeout option issue #119

@rajeshdgsb

Description

@rajeshdgsb

Hi,
I see that the server accepts timeout as an optional param, with default value = 5sec (SOCK_TIMEOUT).
In my understanding , when the client is downloading a file this should mean that if the server does not receive an ack within 'timeout' sec, its should retransmit the last acknowledged packet (RFC 2349)
But, I saw that the server times out and resends the packet after 5sec irrespective of what the timeout is set to.

I looked into the code and in the TftpServer.listen(....) the following is used to listen for incoming packet:
select.select(inputlist, [], [], SOCK_TIMEOUT)
instead shouldn't it be this ?

select.select(inputlist, [], [], timeout)
Using SOCK_TIMEOUT in the above call basically makes the timeout parameter in the following call useless.

self.sessions[key] = TftpContextServer(raddress,
                                                              rport,
                                                              timeout,
                                                              self.root,
                                                              self.dyn_file_func,
                                                              self.upload_open)

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingNot looking at it yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions