heroiclabs / nakama

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

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

Closed nguyentrannhan closed 2 months ago

nguyentrannhan commented 9 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 9 months ago

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

ftkg commented 8 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 2 months ago

Discussed further on the PR here.