halflife icon indicating copy to clipboard operation
halflife copied to clipboard

FastDL not working as intended sometimes.

Open metita opened this issue 6 years ago • 7 comments

Title. Sometimes if you got a fastdl in your server and you add a new resource, then you change the map the server will ignore your fastdl unless you restart your game.

Note: it doesn't happen 100% of the time and there are more things that trigger this, like cancelling the download and getting into the server again, would like more confirmation on this one.

metita avatar Apr 24 '19 03:04 metita

If you're downloading a file, cancel the load (Disconnecting from the server), get back in the server, the fastdl won't be used on that file.

Maxi605 avatar Apr 24 '19 05:04 Maxi605

This is probably because FastDL will track server and map download combinations.

CL_MarkMapAsUsingHTTPDownload will store a string of the format server name:map name which is used to determine if files should be downloaded using FastDL. The first time around this will work because CL_MarkMapAsUsingHTTPDownload is called after the download list has been created, but subsequent attempts will fail.

Perhaps CL_MarkMapAsUsingHTTPDownload should be called after all downloads have been completed, or the entry should be removed if the download is cancelled for any reason (disconnected, server changed map, etc).

Note that the httpstop command will clear the list of combinations, so you should be able to fix it without a restart using that.

I suspect the reason for this is to prevent infinite loops if HTTP download fails for some reason, in that case it may be better to track failure directly. This would avoid an edge case where a map is updated on the server side and clients can't download the new content using FastDL.

Though in that case modified content will cause problems anyway (map CRC failure for one).

SamVanheer avatar Apr 24 '19 05:04 SamVanheer

@mikela-valve hope this can be considered, this a pretty annoying bug

metita avatar Jul 31 '19 06:07 metita

I guess this happens because the clients failed to download some files the first time, for me this happened because some maps where requesting some non existing / invalid resources like .txt or .bmp mostly related to overviews

justgo97 avatar Jul 31 '19 09:07 justgo97

As an addendum to my previous post, a way to solve this would be to let servers advertise a last changed timestamp that clients can use to determine if HTTP cache data needs to be flushed for that server.

This would probably require the server info packet to be changed, which requires a network protocol change and breaks support for older clients. A workaround would be to provide a clc (client-to-server) command that returns the timestamp, but that could be spammed to overwork the server.

SamVanheer avatar Aug 02 '19 11:08 SamVanheer

@mikela-valve any chance for this to be fixed?

metita avatar Aug 05 '20 00:08 metita

+5 years 🚬

criskkky avatar Sep 07 '24 05:09 criskkky

kép

kép

Why don't they fix this? It's ridiculous that i can't join in my favorite and only available server (which is not "Only Dust2") in Hungary in CS 1.6... I contacted server owner and he told me it's game's issue, not server's...

Even if i'm patient, then this happens:

kép

Erikk26 avatar Nov 16 '24 14:11 Erikk26