diff --git a/chat-sync.rkt b/chat-sync.rkt index 0e61bdc..e098e70 100644 --- a/chat-sync.rkt +++ b/chat-sync.rkt @@ -50,8 +50,7 @@ (set! active-connections new-connections)))) (define (depart! connection-id) - (call-with-semaphore - active-connection-mutex + (call-with-semaphore active-connection-mutex (lambda () (define new-connections (set-remove active-connections (cons (current-thread) connection-id))) (set! active-connections new-connections)