273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
(let* ((send-recieve (lambda ()
(mutex-lock! *http-mutex*)
;; (condition-case (with-input-from-request "http://localhost"; #f read-lines)
;; ((exn http client-error) e (print e)))
(set! res (handle-exceptions
exn
(begin
(debug:print 0 "ERROR: failure in with-input-from-request. Giving up.")
(debug:print 0 " message: " ((condition-property-accessor 'exn 'message) exn))
#f)
(with-input-from-request ;; was dat
fullurl
(list (cons 'key "thekey")
(cons 'cmd cmd)
(cons 'params params))
read-string)))
|
|
>
>
|
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
(let* ((send-recieve (lambda ()
(mutex-lock! *http-mutex*)
;; (condition-case (with-input-from-request "http://localhost"; #f read-lines)
;; ((exn http client-error) e (print e)))
(set! res (handle-exceptions
exn
(begin
(debug:print 0 "WARNING: failure in with-input-from-request. Killing associated server to allow clean retry.")
(debug:print 0 " message: " ((condition-property-accessor 'exn 'message) exn))
(hash-table-delete! *runremote* run-id)
(tasks:kill-server-run-id run-id)
#f)
(with-input-from-request ;; was dat
fullurl
(list (cons 'key "thekey")
(cons 'cmd cmd)
(cons 'params params))
read-string)))
|