                 }
             }
                 
-            catch { log?("Error waiting for new connection: \(error)") }
+            catch { log("Error waiting for new connection: \(error)") }
         }
         
-        log?("Stopped GATT Server")
-    }
-    
-    @inline(__always)
+        log("Stopped GATT Server")
+    }
+    
     private func newConnectionID() -> UInt {
-        
         lastConnectionID += 1
-        
         return lastConnectionID
     }
     
-    private func disconnect(_ connection: UInt, error: Error) {
-        
+    private func disconnect(_ connection: UInt, error: Error) async {
         // remove from peripheral, release and close socket
-        connectionsQueue.sync { [unowned self] in
-            self.connections[connection] = nil
-        }
-        
+        self.connections[connection] = nil
         // enable LE advertising
-        do { try controller.enableLowEnergyAdvertising() }
+        do { try await hostController.enableLowEnergyAdvertising() }
         catch HCIError.commandDisallowed { /* ignore */ }
-        catch { log?("Could not enable advertising. \(error)") }
-    }
-    
-    @inline(__always)
-    private func writeDatabase <T> (_ block: (inout GATTDatabase) -> (T)) -> T {
-        
-        return databaseQueue.sync { block(&self.database) }
-    }
-    
-    @inline(__always)
-    private func readConnection(_ block: () -> ()) {
-        
-        return readQueue.sync(execute: block)
+        catch { log("Could not enable advertising. \(error)") }
     }
 }
 

    }
    
    // MARK: - Private Methods
    
    private func main() {
        

}

#endif
