stchang / redis

A redis client for Racket.
17 stars 4 forks source link

double return not properly handled #8

Open stchang opened 10 years ago

stchang commented 10 years ago

Double return of a connection results in two copies of the connection in the idle connection queue.

This results in an error when trying to disconnect the conns:

(define p (make-connection-pool))
(define conn (connection-pool-lease p))
(connection-pool-return conn)
(connection-pool-return conn)
(kill-connection-pool p)
(sleep 2) ; need this otherwise program shutdown will take over

error: write-bytes: output port is closed

Need some sort of synchronization or check to prevent this.