Changeset 14355 in project


Ignore:
Timestamp:
04/22/09 21:18:07 (11 years ago)
Author:
certainty
Message:

allow disconnect of an allready disconnected connection

File:
1 edited

Legend:

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

    r14354 r14355  
    88;; Version: $Id$
    99;; Version:
    10 ;; Last-Updated: Mi Apr 22 20:58:18 2009 (CEST)
     10;; Last-Updated: Mi Apr 22 21:23:41 2009 (CEST)
    1111;;           By: David Krentzlin <david@lisp-unleashed.de>
    12 ;;     Update #: 439
     12;;     Update #: 441
    1313;; URL:
    1414;; Keywords:
     
    6868    status:command-not-implemented? status:parameter-not-implemented? status:access-denied?
    6969    status:access-denied-show-info? status:access-denied-unknown-mech? status:invalid-database?
     70
    7071    status:invalid-strategy? status:no-match? status:no-database-present? status:no-strategies-present?
    7172    make-connection connect disconnect connection-msg-id connection-server-capabilities
     
    468469
    469470  (define (disconnect con)
    470     (receive (success? result) (!quit con)
    471       (when success?
    472         (close-input-port (connection-input-port con))
    473         (close-output-port (connection-output-port con))
    474         (connection-connected-set! con #f))
    475       (not (connection-connected con))))
     471    (when (connection-connected con)
     472      (receive (success? result) (!quit con)
     473        (when success?
     474          (close-input-port (connection-input-port con))
     475          (close-output-port (connection-output-port con))
     476          (connection-connected-set! con #f))))
     477      (not (connection-connected con)))
    476478)
    477479;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note: See TracChangeset for help on using the changeset viewer.