Sometimes we need to call 'disconnect' explicitly in db driver wrapper
module. But pgmoon will close the sock when sock operation failed. Thus
it is unsafe to call 'disconnect' again. With 'isconnected' method we
could detect if the sock is still connected, avoid calling 'disconnect'
twice.
Sometimes we need to call 'disconnect' explicitly in db driver wrapper module. But pgmoon will close the sock when sock operation failed. Thus it is unsafe to call 'disconnect' again. With 'isconnected' method we could detect if the sock is still connected, avoid calling 'disconnect' twice.