Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout option issue #119

Open
rajeshdgsb opened this issue Jun 3, 2021 · 0 comments
Open

Timeout option issue #119

rajeshdgsb opened this issue Jun 3, 2021 · 0 comments
Labels
pending Not looking at it yet

Comments

@rajeshdgsb
Copy link

rajeshdgsb commented Jun 3, 2021

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)
@msoulier msoulier added the pending Not looking at it yet label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Not looking at it yet
Projects
None yet
Development

No branches or pull requests

2 participants