Be less gratuitously noisy on socket close.
This commit is contained in:
parent
c42934d07b
commit
3d0d2c38e9
|
@ -769,10 +769,13 @@
|
|||
((arrived _)
|
||||
conn)
|
||||
((and departure (departed who why))
|
||||
(disconnect-with-error/local-info
|
||||
departure
|
||||
SSH_DISCONNECT_CONNECTION_LOST
|
||||
"I/O error"))
|
||||
(if (zero? (hash-count (connection-channel-map conn)))
|
||||
;; No open or half-open channels. No point in complaining; just leave.
|
||||
#f
|
||||
;; At least one channel. Make more of a noise.
|
||||
(disconnect-with-error/local-info departure
|
||||
SSH_DISCONNECT_CONNECTION_LOST
|
||||
"I/O error")))
|
||||
((says _ amount 'output-byte-count)
|
||||
;; writer reporting bytes transferred
|
||||
(bump-total amount conn))
|
||||
|
@ -854,7 +857,11 @@
|
|||
(handle-evt (send (connection-session-room-handle conn) listen-evt)
|
||||
session-room-message-handler)
|
||||
(channel-events conn))))
|
||||
(loop (handler conn)))))))
|
||||
(define new-conn (handler conn))
|
||||
;; The handler is permitted to return #f to indicate that the session is to be
|
||||
;; gracefully shut down.
|
||||
(when new-conn
|
||||
(loop new-conn)))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Session choreography
|
||||
|
|
Loading…
Reference in New Issue