Index: apimod.scm ================================================================== --- apimod.scm +++ apimod.scm @@ -398,19 +398,21 @@ (let* ((start-t (current-milliseconds)) ;; (readonly-mode (dbr:dbstruct-read-only dbstruct)) ;; (readonly-command (member cmd api:read-only-queries)) ;; (writecmd-in-readonly-mode (and readonly-mode (not readonly-command))) (res (api:dispatch-cmd dbstruct cmd params))) - ;; (if writecmd-in-readonly-mode ;; (conc "attempt to run write command "cmd" on a read-only database") ;; save all stats (let ((delta-t (- (current-milliseconds) start-t))) (hash-table-set! *db-api-call-time* cmd (cons delta-t (hash-table-ref/default *db-api-call-time* cmd '())))) + (assert (not (eof-object? res)) + (conc "FATAL: eof not allowed as returned value. "cmd", "params)) + res)) ;; (if #f ;; writecmd-in-readonly-mode ;; (begin ;; (vector #f res)) Index: ulex-simple/ulex.scm ================================================================== --- ulex-simple/ulex.scm +++ ulex-simple/ulex.scm @@ -271,21 +271,23 @@ (begin (write (obj->string dat) oup) ;; (write dat oup) ;; (serialize dat oup) (close-output-port oup) - (string->obj (read inp)) + (let ((inp-res (read inp))) + (assert (not (eof-object? inp-res)) "FATAL: returning eof not allowed. "cmd", "params) + (string->obj inp-res)) ;; (read inp) ;; (deserialize inp) ) (begin (print "ERROR: send called but no receiver has been setup. Please call setup first!") #f)))) ;; (close-output-port oup) (close-input-port inp) ;; (mutex-unlock! *send-mutex*) ;; DOESN'T SEEM TO HELP - res)))))))) ;; res will always be 'ack unless return-method is direct + res)))))))) ;;====================================================================== ;; work queues - this is all happening on the listener side ;;======================================================================