Code Monkey home page Code Monkey logo

Comments (3)

suchen-sci avatar suchen-sci commented on June 12, 2024
			t, m, err := clntConn.Read(stdctx.Background())
			if err != nil {
				if cs := websocket.CloseStatus(err); cs == websocket.StatusNormalClosure {
					svrConn.Close(websocket.StatusNormalClosure, "")
				} else {
					svrConn.Close(cs, err.Error())
					logger.Errorf("%s: failed to read from client: %v", sp.Name, err)
				}
				break
			}

By the code and this issue of our websocket pkg nhooyr/websocket#439.

I think maybe the client side of websocket is not closed by using websocket StatusNormalClosure?

from easegress.

cyrnicolase avatar cyrnicolase commented on June 12, 2024

Yes you are right, but I have to accommodate these errors

from easegress.

cyrnicolase avatar cyrnicolase commented on June 12, 2024

Me again.

Today I spoke with our iOS development engineers, and after their confirmation, they are using the disconnect() method provided by the SDK, which by default passes websocket.StatusNormalClosure.

And I get websocketproxy#wsproxy#main: failed to read from server: failed to get reader: received close frame: status = StatusNoStatusRcvd and reason = ""

And when I use apifox test it, I get {"level":"ERROR","time":"2024-04-02T03:24:58.978Z","caller":"httpproxy/wspool.go:285","message":"websocketproxy#wsproxy#main: failed to read from server: failed to get reader: received close frame: status = StatusNoStatusRcvd and reason = \"\""}, {"level":"ERROR","time":"2024-04-02T03:24:58.979Z","caller":"httpproxy/wspool.go:257","message":"websocketproxy#wsproxy#main: failed to read from client: failed to get reader: received close frame: status = StatusNoStatusRcvd and reason = \"\""}

from easegress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.