For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 2

WebSocket disconnects after 2 messages are sent with the same ID - possible bug

Environment: C# using WebSocket4Net, Windows 10

Scenario:

Send Login message with ID 1

Login successful

Send data request type message again with ID 1

Websocket disconnects without explanation

On one side this is user error, to send 2 messages with the same ID. But expectations are that connection will stay alive and error will be given back, instead of dropping it.

treprdp-apiwebsocketsrrtoerror-messagedisconnection
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
11.7k 57 39 60

Hi @nina_novik,

You should get back a status indicating that you can't request on a stream that is open. For example, I went into the interactive guide within the packaged documentation and just tried it and this is what came back.

However, I recall using the Login ID as you did within Javascript and it disconnected.

Just to verify, instead of using 1, try something else, say 777 and see what happens. Certainly try within the interactive guides as well.


ahs.png (12.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.