Changeset 15533 in project


Ignore:
Timestamp:
08/22/09 15:46:28 (10 years ago)
Author:
sjamaan
Message:

Fix connection mistake: poll for input when POLLING_READING, output when POLLING_WRITING, not the other way around!
Also, TODO: timeout is irrelevant because libpq does that already

File:
1 edited

Legend:

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

    r15517 r15533  
    227227  ((foreign-lambda int PQsocket pgconn*) (pg-connection-ptr conn)))
    228228
    229 ;; TODO: Add timeout code
    230229(define (wait-for-connection! conn poll-function)
    231230  (let ((conn-fd (pgsql-connection->fd conn))
     
    241240            ((member result (list PGRES_POLLING_WRITING PGRES_POLLING_READING))
    242241             (thread-wait-for-i/o! conn-fd (if (= PGRES_POLLING_READING result)
    243                                                #:output
    244                                                #:input))
     242                                               #:input
     243                                               #:output))
    245244             (loop (poll-function conn-ptr)))
    246245            (else
Note: See TracChangeset for help on using the changeset viewer.