        (dosync
         (ref-set connection-status* :connecting))
 
+       (dosync
+        (ref-set connection-info*
+                 (transient-connection-info connection-type port)))
+
        (let [port (if (nil? port) (+ (rand-int 50000) 2000) port)]
          (case connection-type
            :internal (boot-internal-server)
            :external (boot-external-server port))
-         (wait-until-deps-satisfied :server-ready)
-
-         (dosync
-          (ref-set connection-info*
-                   (transient-connection-info connection-type port)))))))
+         (wait-until-deps-satisfied :server-ready)))))
 
 (defn shutdown-server
   "Quit the SuperCollider synth process."

  "Return true if the server was booted by us, whether internally or
  externally."
  []
  (not-empty @connection-info*))

(defn- server-notifications-on
  "Turn on notification messages from the audio server.  This lets us free

         (sh "jack_connect" src dest)
         (log/info "jack_connect " src " " dest)))))

(if (= :linux (config-get :os))
  (on-deps :server-connected ::connect-jack-ports
           #(when (transient-server?)
              (connect-jack-ports))))

;; We have to do this to handle the change in SC, where they added a "/" to the
;; status.reply messsage, which it should have had in the first place.
