   "Blocks current thread until all osc messages in action-fn have completed.
   Returns result of action-fn."
   [action-fn]
-  (let [id (update-server-sync-id)
+  (let [id (next-id ::server-sync-id)
         prom (promise)
         key (uuid)]
     (on-event "/synced"

(ns overtone.sc.machinery.server.comms
  (:use [overtone.sc.machinery.server osc-validator]
        [overtone.libs.event]
        [overtone.util.lib :only [uuid deref!]])
  (:require [overtone.util.log :as log]))

(defonce server-sync-id* (atom 0))
(defonce osc-debug*     (atom false))
(defonce server-osc-peer*        (ref nil))


  synchronise with its completion. The action-fn can sync using the fn server-sync.
  Returns the result of action-fn."
  [action-fn]
  (let [id (next-id ::server-sync-id)
        prom (promise)
        key (uuid)]
    (on-event "/synced"
