remote: Remove 'zmq-socket-ready?'.

* src/cuirass/remote.scm (zmq-socket-ready?): Remove.
* src/cuirass/scripts/remote-server.scm (zmq-start-proxy): Use 'memq'
instead.
[socket-ready?]: Remove.
This commit is contained in:
Ludovic Courtès 2023-06-18 14:51:57 +02:00
parent c74d60d194
commit bb7579acc0
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 1 additions and 14 deletions

View File

@ -71,7 +71,6 @@
zmq-poll*
zmq-message-receive*
zmq-socket-ready?
zmq-empty-delimiter
zmq-build-request-message
@ -389,13 +388,6 @@ retries a call to PROC."
(define zmq-message-receive*
(EINTR-safe zmq-message-receive))
(define (zmq-socket-ready? items socket)
"Return #t if the given SOCKET is part of ITEMS, a list returned by a
'zmq-poll' call, return #f otherwise."
(find (lambda (item)
(eq? (poll-item-socket item) socket))
items))
(define (zmq-remote-address message)
(zmq-message-gets message "Peer-Address"))

View File

@ -453,11 +453,6 @@ all network interfaces."
(define (zmq-start-proxy backend-port)
"This procedure starts a proxy between client connections from the IPC
frontend to the workers connected through the TCP backend."
(define (socket-ready? items socket)
(find (lambda (item)
(eq? (poll-item-socket item) socket))
items))
;; The poll loop below must not be blocked. Print a warning message if a
;; loop iteration takes more than %LOOP-TIMEOUT seconds to complete.
(define %loop-timeout 5)
@ -481,7 +476,7 @@ frontend to the workers connected through the TCP backend."
(let loop ()
(let* ((items (zmq-poll* poll-items 1000))
(start-time (current-time)))
(when (zmq-socket-ready? items build-socket)
(when (memq build-socket items)
(match (zmq-message-receive* build-socket)
((worker empty rest)
(let* ((fetch-msg (zmq-msg-init