Socket cleanup

The `nym` can change but then `m_Connection` will *not* be reset to `nullptr`; thus this `if` block will not be executed which is responsible to re-connect to the new `nym`. This is the reason for the failure in the functional tests.