python based socket check instead of pdns_control