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

Fix web socket connection error #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bdobretsov
Copy link

ignore ws and wss scheme connection for fix 1005 error when try to ws or wss scheme connect

@pmusolino
Copy link
Owner

Hi there, and thanks for opening this PR.
Could you please provide an example of how to test this change and what the use case is?

@bdobretsov
Copy link
Author

bdobretsov commented Aug 26, 2024

Hi there, and thanks for opening this PR. Could you please provide an example of how to test this change and what the use case is?

HI
Wormholy drops URLSessionWebSocketTask packets and returns the error -1005

let url = URL(string: "wss://www.example.com/socketserver")
URLSession.shared.dataTask(url)
URLSession.shared.webSocketTask(url)

This request will be processed in CustomHTTPPRotocol and will cause an error.

In our bank we use your library, we configured and connected WebSocket connection, but it did not work.
After deleting the library, everything started working fine.
This is a problem with all Network Debuggers.

I made changes that do not allow us to initialize CustomHTTPProtocol and pass the wss connection further. Now everything works. But the query results do not get to Debugger.

@bdobretsov
Copy link
Author

Hi there, and thanks for opening this PR. Could you please provide an example of how to test this change and what the use case is?

To test this, you can do a websocket connection and see that before my modification you will get an error, after there will be no error. But such connections will not be displayed in wormholy screen. I think update readme after merge pr

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

Successfully merging this pull request may close these issues.

2 participants