summaryrefslogtreecommitdiff
path: root/modules/ssh/dist
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-07-31 20:21:49 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-07-31 20:21:49 +0300
commit92e96b660a8a599c99469cabea93950f466e26e9 (patch)
treea02fd1a6215fe28a9fdcfec63c523d937df5fa22 /modules/ssh/dist
parentnode.scm (node-server-running?): Bugfix: Check the default port (diff)
downloadguile-ssh-92e96b660a8a599c99469cabea93950f466e26e9.tar.gz
node.scm (node-server-running?): Bugfix: Check if default port is set
* modules/ssh/dist/node.scm (node-server-running?): Bugfix: Check if default port is set for node before checking for RREPL with that port.
Diffstat (limited to 'modules/ssh/dist')
-rw-r--r--modules/ssh/dist/node.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/ssh/dist/node.scm b/modules/ssh/dist/node.scm
index 97090a4..d8b07a8 100644
--- a/modules/ssh/dist/node.scm
+++ b/modules/ssh/dist/node.scm
@@ -77,6 +77,8 @@
rrepl-skip-to-prompt
rrepl-get-result))
+(define %guile-default-repl-port 37146)
+
(define (eof-or-null? str)
"Return #t if a STR is an EOF object or an empty string, #f otherwise."
@@ -281,10 +283,11 @@ listens on an expected port, return #f otherwise."
(or (and (zero? rc)
(guile-up-and-running?))
;; Check the default port.
- (receive (result rc)
- (rexec node "pgrep --full 'guile --listen'")
- (and (zero? rc)
- (guile-up-and-running?))))))
+ (and (= (node-repl-port node) %guile-default-repl-port)
+ (receive (result rc)
+ (rexec node "pgrep --full 'guile --listen'")
+ (and (zero? rc)
+ (guile-up-and-running?)))))))
(define (node-run-server node)