mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 23:46:59 +00:00
fixed mod downloading stuck at 50%
This commit is contained in:
parent
76a1b05056
commit
7cd25fbb22
@ -243,6 +243,7 @@ void SyncResources(SOCKET Sock){
|
||||
Amount++;
|
||||
}
|
||||
if(!FNames.empty())info("Syncing...");
|
||||
SOCKET DSock = InitDSock();
|
||||
for(auto FN = FNames.begin(),FS = FSizes.begin(); FN != FNames.end() && !Terminate; ++FN,++FS) {
|
||||
auto pos = FN->find_last_of('/');
|
||||
if (pos != std::string::npos) {
|
||||
@ -271,7 +272,6 @@ void SyncResources(SOCKET Sock){
|
||||
}
|
||||
CheckForDir();
|
||||
std::string FName = a.substr(a.find_last_of('/'));
|
||||
SOCKET DSock = InitDSock();
|
||||
do {
|
||||
TCPSend("f" + *FN,Sock);
|
||||
|
||||
@ -296,7 +296,6 @@ void SyncResources(SOCKET Sock){
|
||||
}
|
||||
|
||||
}while(fs::file_size(a) != std::stoi(*FS) && !Terminate);
|
||||
KillSocket(DSock);
|
||||
if(!Terminate){
|
||||
if(!fs::exists(GetGamePath() + "mods/multiplayer")){
|
||||
fs::create_directory(GetGamePath() + "mods/multiplayer");
|
||||
@ -305,6 +304,7 @@ void SyncResources(SOCKET Sock){
|
||||
}
|
||||
WaitForConfirm();
|
||||
}
|
||||
KillSocket(DSock);
|
||||
if(!Terminate){
|
||||
TCPSend("Done",Sock);
|
||||
info("Done!");
|
||||
|
@ -27,7 +27,7 @@ std::string GetVer(){
|
||||
return "1.80";
|
||||
}
|
||||
std::string GetPatch(){
|
||||
return ".1";
|
||||
return ".2";
|
||||
}
|
||||
void ReLaunch(int argc,char*args[]){
|
||||
std::string Arg;
|
||||
@ -182,7 +182,7 @@ void InitLauncher(int argc, char* argv[]) {
|
||||
CheckName(argc, argv);
|
||||
CheckLocalKey(); //will replace RequestRole
|
||||
Discord_Main();
|
||||
//Dev = true;
|
||||
Dev = true;
|
||||
//RequestRole();
|
||||
CustomPort(argc, argv);
|
||||
CheckForUpdates(argc, argv, std::string(GetVer()) + GetPatch());
|
||||
|
Loading…
x
Reference in New Issue
Block a user