Skip to content
New issue

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

Websocket : Function StartClient ALWAYS returns true. #255

Open
hyryel opened this issue Jun 22, 2024 · 1 comment
Open

Websocket : Function StartClient ALWAYS returns true. #255

hyryel opened this issue Jun 22, 2024 · 1 comment

Comments

@hyryel
Copy link
Contributor

hyryel commented Jun 22, 2024

Hi, I've experienced an error where the function StartClient returns true whereas the client is not actually connected.

In the file Netcode.Transports.WebSocket.WebSocketTransport, line 122, there is a return true;

I've drilled down the misfunction, and it seems that the lib WebSocketSharp return void in it's Connect function.

As the code of WebSocketSharp is in this repo, Could you patch the file : WebSocket-Sharp.WebSocket.cs
on lines 3234 to change :

if( connect())
  open()

by

if( connect())
  open()
else
  throw new InvalidOperationException("Could not connect to the server");

Or better, make a fix so that the function Connect returns bool instead of void ?
Even better, I could propose a patch ?

@hyryel
Copy link
Contributor Author

hyryel commented Jun 22, 2024

I've created a PR to address this issue :
PR 256 - Connect returns true instead of void

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant