fix to close socket when it's NOT a persistent mode, and already opened