We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't accept incoming connections on netcore 3.1 server. Same code used to work before when server was a Unity project.
edit: Disabling UnsyncedEvents fixes the issue.
private void Listener_ConnectionRequestEvent(ConnectionRequest request) { Logger.Information($"Incoming connection from {request.RemoteEndPoint}"); if (Server.ConnectedPeersCount < 1337) request.AcceptIfKey($"{Id}/HUB"); else request.Reject(); }
Using AcceptIfKey or Accept doesn't matter, I always get the same exception
exception: System.Threading.LockRecursionException HResult=0x80131500 Message=Recursive upgradeable lock acquisitions not allowed in this mode. Source=System.Private.CoreLib StackTrace: at System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLockCore(TimeoutTracker timeout) at System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock() at LiteNetLib.NetManager.OnConnectionSolved(ConnectionRequest request, Byte[] rejectData, Int32 start, Int32 length) at LiteNetLib.ConnectionRequest.AcceptIfKey(String key) at Zin.Hub.Networking.HubServer.Listener_ConnectionRequestEvent(ConnectionRequest request) in C:\Users\dorq\source\repos\zin\Server\Zin.Hub\Networking\HubServer.cs:line 84 at LiteNetLib.EventBasedNetListener.LiteNetLib.INetEventListener.OnConnectionRequest(ConnectionRequest request) at LiteNetLib.NetManager.ProcessEvent(NetEvent evt) at LiteNetLib.NetManager.CreateEvent(EType type, NetPeer peer, IPEndPoint remoteEndPoint, SocketError errorCode, Int32 latency, DisconnectReason disconnectReason, ConnectionRequest connectionRequest, DeliveryMethod deliveryMethod, NetPacket readerSource, Object userData) at LiteNetLib.NetManager.ProcessConnectRequest(IPEndPoint remoteEndPoint, NetPeer netPeer, NetConnectRequestPacket connRequest) at LiteNetLib.NetManager.DataReceived(Byte[] reusableBuffer, Int32 count, IPEndPoint remoteEndPoint) at LiteNetLib.NetManager.LiteNetLib.INetSocketListener.OnMessageReceived(Byte[] data, Int32 length, SocketError errorCode, IPEndPoint remoteEndPoint)
Library version: commit 0e5880b on client, 0.9.2.2 on server
Framework: Unity on client, netcore 3.1 on server
OS: Windows
The text was updated successfully, but these errors were encountered:
d3ee215
@RevenantX I'm running into the same issue. Why was this closed? Disabling UnsyncedEvents is only a workaround, not a fix.
Sorry, something went wrong.
@tylerohlsen "closed this in d3ee215 on May 20" because it's fixed in master branch.
@RevenantX awesome, thanks for the confirmation! Do you have a plan for when the next nuget release will be?
@tylerohlsen no, but maybe soon after some mini improvements.
RevenantX
No branches or pull requests
Can't accept incoming connections on netcore 3.1 server. Same code used to work before when server was a Unity project.
edit: Disabling UnsyncedEvents fixes the issue.
Using AcceptIfKey or Accept doesn't matter, I always get the same exception
exception:
System.Threading.LockRecursionException
HResult=0x80131500
Message=Recursive upgradeable lock acquisitions not allowed in this mode.
Source=System.Private.CoreLib
StackTrace:
at System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLockCore(TimeoutTracker timeout)
at System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock()
at LiteNetLib.NetManager.OnConnectionSolved(ConnectionRequest request, Byte[] rejectData, Int32 start, Int32 length)
at LiteNetLib.ConnectionRequest.AcceptIfKey(String key)
at Zin.Hub.Networking.HubServer.Listener_ConnectionRequestEvent(ConnectionRequest request) in C:\Users\dorq\source\repos\zin\Server\Zin.Hub\Networking\HubServer.cs:line 84
at LiteNetLib.EventBasedNetListener.LiteNetLib.INetEventListener.OnConnectionRequest(ConnectionRequest request)
at LiteNetLib.NetManager.ProcessEvent(NetEvent evt)
at LiteNetLib.NetManager.CreateEvent(EType type, NetPeer peer, IPEndPoint remoteEndPoint, SocketError errorCode, Int32 latency, DisconnectReason disconnectReason, ConnectionRequest connectionRequest, DeliveryMethod deliveryMethod, NetPacket readerSource, Object userData)
at LiteNetLib.NetManager.ProcessConnectRequest(IPEndPoint remoteEndPoint, NetPeer netPeer, NetConnectRequestPacket connRequest)
at LiteNetLib.NetManager.DataReceived(Byte[] reusableBuffer, Int32 count, IPEndPoint remoteEndPoint)
at LiteNetLib.NetManager.LiteNetLib.INetSocketListener.OnMessageReceived(Byte[] data, Int32 length, SocketError errorCode, IPEndPoint remoteEndPoint)
Library version: commit 0e5880b on client, 0.9.2.2 on server
Framework: Unity on client, netcore 3.1 on server
OS: Windows
The text was updated successfully, but these errors were encountered: