Browse Source

fix: 🐛 fix bug of server exception

tags/0.1.0
gsy1519 2 years ago
parent
commit
554e95e16f
2 changed files with 10 additions and 2 deletions
  1. +2
    -2
      logic/Server/GameServer.cs
  2. +8
    -0
      logic/Server/RpcServices.cs

+ 2
- 2
logic/Server/GameServer.cs View File

@@ -201,8 +201,8 @@ namespace Server
MessageOfAll msg = new MessageOfAll();
//msg.GameTime
msg.SubjectFinished = (int)game.GameMap.NumOfRepairedGenerators;
//msg.StudentGraduated
//msg.StudentQuited
msg.StudentGraduated = (int)game.GameMap.NumOfEscapedStudent;
msg.StudentQuited = (int)game.GameMap.NumOfDeceasedStudent;
msg.StudentScore = 0;
msg.TrickerScore = 0;
game.GameMap.GameObjLockDict[GameObjType.Character].EnterReadLock();


+ 8
- 0
logic/Server/RpcServices.cs View File

@@ -65,6 +65,10 @@ namespace Server
//Console.WriteLine("Send!");
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
finally
{
semaDict[request.PlayerId].Item2.Release();
@@ -116,6 +120,10 @@ namespace Server
//Console.WriteLine("Send!");
}
}
catch (Exception ex)
{
//Console.WriteLine(ex);
}
finally
{
semaDict[request.PlayerId].Item2.Release();


Loading…
Cancel
Save