Changeset 13456 in project


Ignore:
Timestamp:
03/02/09 21:50:21 (11 years ago)
Author:
sjamaan
Message:

Replace dynamic-wind with exception handling code, like the chicken 3 http-server. This fixes another race-condition, too, so it's actually better...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/spiffy.scm

    r13449 r13456  
    433433                    (receive (in out)
    434434                      (tcp-accept listener)
     435                      (mutex-update! thread-count add1)
    435436                      (thread-start!
    436437                       (lambda ()
    437                          (dynamic-wind
    438                              (lambda () (mutex-update! thread-count add1))
    439                              (lambda () (handle-incoming-request in out))
    440                              (lambda () (mutex-update! thread-count sub1)))))))
     438                         (handle-exceptions
     439                          e #f (handle-incoming-request in out))
     440                         (mutex-update! thread-count sub1)))))
    441441                (accept-next-connection))))
    442442      ;; Drop privileges ASAP, now the TCP listener has been created
Note: See TracChangeset for help on using the changeset viewer.