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

Session time out. #1

Open
cjkgit opened this issue Apr 28, 2023 · 0 comments
Open

Session time out. #1

cjkgit opened this issue Apr 28, 2023 · 0 comments

Comments

@cjkgit
Copy link

cjkgit commented Apr 28, 2023

In findClient() in TFTPServer/main.cpp
the session time out determination is suspect.
I think it should be more like:

	DWORD dwExpiration = g_Clients[i].dwLastSignOfLife + TFTP_SESSION_TIMEOUT;
	if (    g_Clients[i].eOpcode 
		 && (g_Clients[i].dwLastSignOfLife < dwNow)

// && (g_Clients[i].dwLastSignOfLife < dwExpiration) //error?
&& (dwNow >= dwExpiration) //better, since 'now' has hit the expiration time?
)
{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant