-
Notifications
You must be signed in to change notification settings - Fork 42
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
ensure handshake is performed #53
Conversation
emacs26 pass :nowait to `open-gnutls-stream` but emacs25 doesn't. emacs-26 branch on github: https://github.com/emacs-mirror/emacs/blob/emacs-26/lisp/net/network-stream.el#L381 emacs-25 branch on github: https://github.com/emacs-mirror/emacs/blob/emacs-25/lisp/net/network-stream.el#L354 other open stream functions which is used when gnutls is not available seems don't support :nowait arguments, so we should check process-status is open or not instead of passed argument `nowait`.
Thanks for the change! Your reasoning is valid, I think. But I'm a little worried that this will mean that sometimes when clients are not setting |
I’m not c expert, but look through underlying function https://github.com/emacs-mirror/emacs/blob/e20d7381ee85611f9e1d1e6bef4fe2d7e2ae7780/src/process.c#L4179 |
Thanks for the reply. I looked up the possible process statuses, and it would either have to be open, or closed. Either way should work here. However, another thought occurred to me: how do we know that if nowait is true we don't try to handshake twice? The process may be open by the time we reach your change, and the sentinel should also get the change notification. |
after handshake successed, websocket's ready-state is open prevent handshake is executed when process status is connect
Thanks! I confirmed called twice.
I add I fixed to call |
Thanks! One additional suggestion: can you rename |
It is more accurate name. I renamed in 607355d. Thanks! |
emacs26 pass :nowait to
open-gnutls-stream
but emacs25 doesn't.emacs-26 branch on github:
https://github.com/emacs-mirror/emacs/blob/emacs-26/lisp/net/network-stream.el#L381
emacs-25 branch on github:
https://github.com/emacs-mirror/emacs/blob/emacs-25/lisp/net/network-stream.el#L354
And other open stream functions which is used when gnutls is not available
seems don't support :nowait arguments, so we should check
process-status is open or not instead of passed argument
nowait
.