avoid invalidated iterator when connection fails
1 file changed