branch: externals/websocket
commit d28b6b46334781f7b6922be294ee45deab0b9a84
Author: Yuya Minami <[email protected]>
Commit: Yuya Minami <[email protected]>
ensure handshake is performed
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`.
---
websocket.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/websocket.el b/websocket.el
index b7d62f45de..a3e903515c 100644
--- a/websocket.el
+++ b/websocket.el
@@ -730,7 +730,7 @@ to the websocket protocol.
conn
(websocket-sentinel url conn key protocols extensions custom-header-alist
nowait))
(set-process-query-on-exit-flag conn nil)
- (unless nowait
+ (when (eq 'open (process-status conn))
(websocket-handshake url conn key protocols extensions
custom-header-alist))
websocket))