connect before connection.stop