branch: externals/websocket
commit 74f00575b9bc6103678eb262295349ca35b58adc
Author: Yuya Minami <[email protected]>
Commit: Yuya Minami <[email protected]>
Make condition more readable
---
websocket.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/websocket.el b/websocket.el
index 736a2647b0..a594c016a1 100644
--- a/websocket.el
+++ b/websocket.el
@@ -740,10 +740,9 @@ to the websocket protocol.
(defun websocket-ensure-handshake (url conn key protocols extensions
custom-header-alist nowait)
(let ((url-struct (url-generic-parse-url url))
(websocket (process-get conn :websocket)))
- (when(and (eq 'connecting (websocket-ready-state websocket))
- (memq (process-status conn)
- (or (and nowait '(connect run))
- '(open run))))
+ (when (and (eq 'connecting (websocket-ready-state websocket))
+ (memq (process-status conn)
+ (list 'run (if nowait 'connect 'open))))
(process-send-string conn
(format "GET %s HTTP/1.1\r\n"
(let ((path (url-filename url-struct)))