summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-07-03 22:55:20 +0530
committerArun Isaac2022-07-03 23:21:42 +0530
commitce9117e5bf87cbd8e590f733576d547a85c69b68 (patch)
treefdc4b955a1209b7f3a0791d498e3251d662cacdd
parentbaccbbf14b269f6299f84c329ac4d1859cc16dcd (diff)
downloadtissue-ce9117e5bf87cbd8e590f733576d547a85c69b68.tar.gz
tissue-ce9117e5bf87cbd8e590f733576d547a85c69b68.tar.lz
tissue-ce9117e5bf87cbd8e590f733576d547a85c69b68.zip
bin: Correctly support REPL listening on TCP socket.
Prior to this, the REPL would listen on a Unix socket even if a TCP socket was requested. * bin/tissue (tissue-run-web): Correctly support REPL listening on TCP socket.
-rwxr-xr-xbin/tissue9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/tissue b/bin/tissue
index e1707a8..8484363 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -225,7 +225,10 @@ Run a web search service reading configuration from CONFIG-FILE.
(list (option '("listen-repl")
#t #f
(lambda (opt name arg result)
- (acons 'listen-repl arg result))))
+ (acons 'listen-repl
+ (or (string->number arg)
+ arg)
+ result))))
invalid-option
(lambda (config-file result)
(append (call-with-input-file config-file
@@ -243,9 +246,9 @@ Run a web search service reading configuration from CONFIG-FILE.
(make-unix-domain-server-socket #:path listen-repl))
(else
(format (current-error-port)
- "REPL server listening on ~a~%"
+ "REPL server listening on port ~a~%"
listen-repl)
- (make-unix-domain-server-socket #:path listen-repl))))))
+ (make-tcp-server-socket #:port listen-repl))))))
(start-web-server (listen->socket-address (assq-ref args 'listen))
(map (match-lambda
((name parameters ...)