Skip to content

WebSocketClient.Connect fails with NullReferenceException #106

@gishu

Description

@gishu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions