Added pwmd_disconnect() to close the connection without freeing the