Olivine-Labs / Alchemy-Websockets

An extremely efficient C# WebSocket server.
http://AlchemyWebsockets.net
Other
309 stars 105 forks source link

WebSocketClient.Connect fails with NullReferenceException #106

Open gishu opened 9 years ago

gishu commented 9 years ago

Here's the stack trace

Alchemy.dll!Alchemy.WebSocketClient.SetupContext(Alchemy.Classes.Context context) Line 187  
Alchemy.dll!Alchemy.WebSocketClient.HandleClientThread() Line 94    C#
[External Code] 

_context.Connection.Connected - this property evaluation seems to be the problem.

The Server (also using the same Alchemy binary) works fine - validated that with a browser as client. I built the source (commit# 42c00b6... Jack Lawson) on Win8 64bit.

Just a cursory look at the code - so I may be off here In WebSocketClient#OnRunClient, I see a using block with _context. At the end of the block _context.Dispose is called which closes the TcpClient instance. The HandleClientThread then seems to be trying to use the closed object.

KumarSunilV commented 9 years ago

Hi,

I'm seeing the same too? Which is the stable version which can be used for testing?

Thanks, Sunil

steforster commented 9 years ago

Since more than one year no update here! You need to try another fork, e.g. https://github.com/steforster/Alchemy-Websockets.