Fix assert condition in pipe._onConnected