Remove unused variable

$flags is not used in connect()