Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

reconnect fail on Firefox #25

Open
d2school opened this issue Aug 9, 2023 · 1 comment
Open

reconnect fail on Firefox #25

d2school opened this issue Aug 9, 2023 · 1 comment

Comments

@d2school
Copy link

d2school commented Aug 9, 2023

I write the sample-project "chat" with " options { reconnect: 5000 }". After I restart websocket server, ws-clients in Edge or Chrome are working fine and successfully reconnecting, except for Firefox.

OS: Ubuntu 22.04, Firefox: 116.0.2

@d2school
Copy link
Author

d2school commented Aug 9, 2023

I found the reason:
file: /src/neffos.ts
line : 925

-if (isNull(resolve) || resolve.toString() == "function () { [native code] }") {
+if (isNull(resolve) || resolve.toString() == "function () { [native code] } || resolve.toString() == "function () {\n    [native code]\n}") {

since the result of "resolve.toString()" in Firefox is

function () {
    [native code]
}

(there are 4 spaces before "[native")
but not:
function () { [native code] }

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

No branches or pull requests

1 participant