Quantcast
Channel: #Zyan Communication Framework
Viewing all articles
Browse latest Browse all 665

Created Unassigned: Remoting custom errors mode had already been set [2482]

$
0
0
I'm using multiple ZyanConnections with different servers. Connections created in paralel by Tasks. Sometimes I get exception with message "Remoting custom errors mode had already been set". As I understand it's happening because every IClientProtocolSetup implementation set RemotingConfiguration.CustomErrorsMode static property and exception is generating on second invoke. There is data race:
```
if (RemotingConfiguration.CustomErrorsMode != CustomErrorsModes.Off)
{
RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;
}
```
What about some lock or try/catch (because property already set and we can ignore exception)?

Viewing all articles
Browse latest Browse all 665

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>