fukamachi / integral

[OBSOLETE] Use Mito instead.
https://github.com/fukamachi/mito
BSD 3-Clause "New" or "Revised" License
54 stars 3 forks source link

bug in reconnect in get-connection #7

Closed rudolph-miller closed 9 years ago

rudolph-miller commented 9 years ago
@export
(defun get-connection ()
  "Return the current established connection handle."

  (unless (connected-p)
    (error '<connection-not-established-error>))

  (let ((handle (connection-handle *db*)))
    (if (dbi:ping handle)
        handle
        (progn
          (dbi:disconnect handle)
          (setf *db* nil)
          (apply #'connect (connection-connect-args *db*))))))

In the last line of this method, db should be nil.