mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-12 18:17:02 +00:00
perf[cs]: avoid duplicate initializations
This commit is contained in:
1 parent
4ed627353c
commit
4bf6025f57
1 file changed
+6
@@ -10,10 +10,16 @@ namespace zfoocs
|
||||
|
||||
private static readonly IProtocolRegistration[] protocols = new IProtocolRegistration[MAX_PROTOCOL_NUM];
|
||||
private static readonly Dictionary<Type, short> protocolIdMap = new Dictionary<Type, short>();
|
||||
private static bool initialized = false;
|
||||
|
||||
|
||||
public static void InitProtocol()
|
||||
{
|
||||
if (initialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
{}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user