jsonrpc icon indicating copy to clipboard operation
jsonrpc copied to clipboard

jsonrpc:call returns NIL sometimes with SBCL

Open ghost opened this issue 6 years ago • 0 comments

Sometime, call function does not return value.

(ql:quickload :jsonrpc)

;; server
(defvar *server* (jsonrpc:make-server))
(sb-thread:make-thread
 (lambda ()
   (jsonrpc:expose *server* "sum" (lambda (args) (reduce #'+ args)))
   (jsonrpc:server-listen *server* :port 50879 :mode :websocket)))

;; client
(defvar *client* (jsonrpc:make-client))
(jsonrpc:client-connect *client* :url "ws://127.0.0.1:50879" :mode :websocket)
(dotimes (n 10000)
  (unless (= 30 (jsonrpc:call *client* "sum" '(10 20)))
    (error "not 30")))

ghost avatar Aug 22 '18 11:08 ghost