Clients dispose fileTransfers when shutting down (otherwise the files will stay open and cause "used by another process" exceptions when attempting to receive them again)

This commit is contained in:
Joonas Rikkonen
2018-08-21 16:43:05 +03:00
parent f09fcfc3be
commit 6cb2a7260c

View File

@@ -1408,6 +1408,11 @@ namespace Barotrauma.Networking
{
client.Shutdown("");
foreach (var fileTransfer in FileReceiver.ActiveTransfers)
{
fileTransfer.Dispose();
}
if (HasPermission(ClientPermissions.ServerLog))
{
ServerLog?.Save();