anchor.diff:      ;; This can happen if the timer expires but some other task reconfigures
       ;; a new timeout time.
       (return-from timeout-timer-handler))
  -  ;; Disarm it so it stops triggering the source
  -  (mezzano.supervisor:timer-disarm (tcp-connection-timeout-timer connection))
     (mezzano.supervisor:with-mutex ((tcp-connection-lock connection))
  +    ;; Disarm it so it stops triggering the source
  +    (mezzano.supervisor:timer-disarm (tcp-connection-timeout-timer connection))
       (setf (tcp-connection-pending-error connection)
             (make-condition 'connection-timed-out
                             :host (tcp-connection-remote-ip connection)
                             :port (tcp-connection-remote-port connection)))
       (mezzano.supervisor:condition-notify (tcp-connection-cvar connection) t)
  -    (detach-tcp-connection connection)))
  +    (case (tcp-connection-state connection)
  +      (:syn-sent
  +       (detach-tcp-connection connection))
  +      (:closed)
  +      (t
  +       (close-connection connection)))))
   
   (defmethod initialize-instance :after ((instance tcp-connection) &key)
     (setf (slot-value instance '%retransmit-source)
  
positive.code: (defmethod stream-element-type ((stream tcp-octet-stream))
    '(unsigned-byte 8))
  
  (defun tcp-stream-connect (address port &key element-type external-format)
    (cond ((or (not element-type)
               (sys.int::type-equal element-type 'character))
           (make-instance 'tcp-stream
                          :connection (tcp-connect (sys.net::resolve-address address) port)
                          :external-format (sys.int::make-external-format
                                            (or element-type 'character)
                                            (or external-format :default)
  
negative.code:     (when condition
        (error condition))))
  
  (defun tcp-connect (ip port &key persist timeout)
    (let* ((interface (nth-value 1 (mezzano.network.ip:ipv4-route ip)))
           (source-address (mezzano.network.ip:ipv4-interface-address interface))
           (source-port (allocate-local-tcp-port source-address ip port))
  