Repair connection-state tracking

This commit is contained in:
Tony Garnock-Jones 2021-06-18 18:12:23 +02:00
parent 2e0b9505cc
commit dfd51a5235
1 changed files with 2 additions and 2 deletions

View File

@ -301,7 +301,6 @@
#:on-data on-data #:on-data on-data
#:on-eof [on-eof void]) #:on-eof [on-eof void])
(define connection-state 'pending) (define connection-state 'pending)
(begin/dataflow (log-info "connection-state ~a" connection-state))
(define (transition new-state) (define (transition new-state)
(when (not (equal? connection-state new-state)) (when (not (equal? connection-state new-state))
(match* (connection-state new-state) (match* (connection-state new-state)
@ -313,7 +312,8 @@
[('pending (list 'error m)) [('pending (list 'error m))
((or on-rejected (lambda (m) (stop-current-facet))) m)] ((or on-rejected (lambda (m) (stop-current-facet))) m)]
[(_ (list 'error m)) [(_ (list 'error m))
((or on-error (lambda (m) (stop-current-facet))) m)]))) ((or on-error (lambda (m) (stop-current-facet))) m)])
(set! connection-state new-state)))
(define-field peer-source #f) (define-field peer-source #f)
(define-field peer-sink #f) (define-field peer-sink #f)