libtorc-core: Better handling of socket errors in TorcSSDP