Inline stop and close_connection