heroiclabs / nakama

Distributed server for social and realtime games and apps.
https://heroiclabs.com
Apache License 2.0
9.09k stars 1.1k forks source link

Nakama-js can be timeout when pipeline.ProcessRequest return false #1164

Closed nguyentrannhan closed 3 months ago

nguyentrannhan commented 10 months ago

Description

When pipeline.ProcessRequest return false, the nakama-js can be timeout because the IncommingLoop is break. To fix it, we add a flag for safely break the IncommingLoop

Steps to Reproduce

  1. Run nakama-js-webpack-example
  2. Run joinChat with wrong input
  3. Errors reported to client and in console log

Expected Result

nakama-js should return with invalid input error not socket timeout

Actual Result

Error is thrown with socket timeout

Context

Your Environment

linear[bot] commented 10 months ago

NK-523 Nakama-js can be timeout when pipeline.ProcessRequest return false

ftkg commented 9 months ago

I don't understand what the issue is supposed to be here and its attempted fix. If you are sending a malformed payload that cannot be processed, the socket will be closed as intended. What is the "wrong input" you are sending in joinChat?

zyro commented 3 months ago

Discussed further on the PR here.