Close socket on flooding detection