Calling connectWebSocket twice fails #2169
This is a minimized version of my case. The first connect is successful. But after second
And sometimes I recieve another error :
What I am missing here ? I really need to be able to two sockets at the same time.
The text was updated successfully, but these errors were encountered:
Is this restriction by protocol ? Because in my application I need to open ~40 sockets at the same time.
With your pushes now the simple case I send is working(God bless you man I am really blocked by that). But program still crushes time to time since I open more sockets. There is a separate issue which close() is causing a freeze but I opened another ticket about it
The current crush is can be seen below. But unfortunately I don't have a minimal example to present it. I will try to reproduce it with a minimal example
core.exception.AssertError@../../.dub/packages/vibe-core-1.4.0/vibe-core/source/vibe/core/net.d(575): Assertion failure
This change required a rework of how the connection close and resource management is done to avoid InvalidMemoryOperationError. As a side-effect, this also fixes a leak of TCP connections for connectWebSocket. The rework in particular makes sure that HTTPClientResponse.disconnect and HTTPServerResponse.finalize is called, and only called from the task that created the web socket. This makes sure that the HTTP client instance is properly returned to the connection pool after the web socket is closed. Closes #2172.