Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Fix domain discernment for epicbox addresses #1

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

who-biz
Copy link

@who-biz who-biz commented Mar 2, 2023

-This PR resolves the localhost websockets SSL error below:

ERROR ws::handler] WS Error <Protocol>: Unable to parse domain from wss://[127.0.0.1/](https://127.0.0.1/). Needed for SSL

For some reason, our 'to_address' was not properly including our domain, nor port, and default behavior is to substitute 127.0.0.1:443

Since ws requires a domain name for SSL validation (not an IP), this was causing an error and subsequent unresponsive hang behavior

Following this error, 'epoll' function causes epicbox to hang indefinitely because it is called with a timeout=-1. This commit does not resolve the timeout problem. Only domain discernment is addressed here.

- This resolves the localhost websockets SSL error
- For some reason, our 'to_address' was not properly including our domain, nor port, and default behavior is to substitute 127.0.0.1:443
- Since websockets requires a domain name for SSL validation (not an IP), this was causing an error and hang
- Following this error, 'epoll' function causes epicbox to hang indefinitely because it is called with a timeout=-1
- This commit does not resolve the timeout problem. Only the domain discernment
@who-biz
Copy link
Author

who-biz commented Mar 2, 2023

Will follow up with more information on the epoll issue... it looks like we can maybe resolve it by adding a default timeout to post_slate_federated call (message_expiry_in_seconds is an optional argument to function, as written).. Not sure if that will work or not.

@who-biz who-biz merged commit fe7d161 into EpicCash:epicbox-1.0.0 Mar 20, 2023
@who-biz
Copy link
Author

who-biz commented Mar 20, 2023

Just a note that there is probably a cleaner way to handle this.

Will investigate as we fix port discernment in future. For now, this works

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

Successfully merging this pull request may close these issues.

2 participants