WebSockets rewrite
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, nodejs, wordpress
Línea de trabajo
Review the changes described for wsConnectUserToServer in api2.js, the wpIdentity WebSocket package switch, and the Caddy configuration shown in the issue. Check the server log and client behavior against the retry limits and WebSocket routing; done means failed connections no longer retry indefinitely or fall back to HTTP unexpectedly.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There have been problems over time with the WebSocket functionality in WordLand and wpIdentity. But I think I've gotten it stabilized, and since @scotthansonde was involved in this, a long time ago, I thought I should close the loop.
- I rewrote wsConnectUserToServer in api2.js to wait 10 seconds between retries after a failed connection, and to only try 100 times, and after that it gives up. You can reload the page to get another set of tries. Previously it waited 1 second and retried indefinitely.
- I switched the websockets package wpIdentity was using from nodejs-websocket to ws. This was based on advice I got from ChatGPT and Claude.ai, saying that nodejs-websocket was not being maintained, and the gold standard for everyone was ws.
- I changed the Caddy config file on the server, per the advice of ChatGPT, to make sure that failed WS connections didn't fall back to HTTP connections, which is what I was seeing in the logfile, along with the steady stream of errors in the user's JS console (this came up the other day in a bug report on the wordlandSupport repo issues list.
The result? It's much calmer in the server log. This is kind of mysterious, I didn't expect it to settle down so quickly because there must have been some old clients out there reconnecting every second?
The new Caddy file
{
on_demand_tls {
ask http://localhost:1339/isdomainvalid
}
}
https:// {
tls {
on_demand
}
@websocketsWordlandSocial {
host wordland.social
header Connection *Upgrade*
header Upgrade websocket
}
@httpWordlandSocial {
host wordland.social
}
reverse_proxy @websocketsWordlandSocial localhost:1502
reverse_proxy @httpWordlandSocial localhost:1339
# Optional: fallback for other domains
reverse_proxy localhost:1339
}
Screen shot of server log with a client trying to connect every second
- Lenguaje dominante
- JavaScript
- Estrellas
- 21
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scripting/wpIdentity
-
Saving metadata to posts Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
scripting/wpIdentity#6 ·
-
Sending blocks to WordPress? Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
scripting/wpIdentity#5 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
scripting/wpIdentity#2 · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
scripting/wpIdentity#1 ·
Todos los issues de scripting/wpIdentity
Issues similares
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
-
Add: BuyPass TV Abiertochannels:add check:passed
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
S: triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100