Giter VIP home page Giter VIP logo

Comments (8)

0x00002a avatar 0x00002a commented on August 21, 2024 1

Yeah I ran into the same issue during testing, its an issue with websocat (issue) you need to pass -E

from malloy.

0x00002a avatar 0x00002a commented on August 21, 2024 1

Found the bug:

return std::visit([](auto& s) { boost::beast::websocket::close_reason ec; s.close(ec); return ec; }, underlying_conn_);
this calls the non error_code version meaning it will throw on failure. I'm currently writing up an issue meant to be a discussion of how we deal with stuff like this (how to report errors, whether to use error code or exceptions mostly, etc) but this should probably be async anyway.

from malloy.

0x00002a avatar 0x00002a commented on August 21, 2024 1

I should have time to do it tomorrow. I'll fix it in the log style and we can potentially change it after #40 is resolved

from malloy.

Tectu avatar Tectu commented on August 21, 2024 1

Personally I'd put out a fix for this bug before tackling #40 given that at least on the surface this looks like an easy fix.

from malloy.

Tectu avatar Tectu commented on August 21, 2024

There still seems to be an issue so I am reopening this.

When running the malloy-example-server-websocket example and using websocat -E the server crashes due to an uncaught exception after sending the 10th message:

C:\Users\joel\Documents\projects\malloy\cmake-build-debug\examples\server\websocket\malloy-example-server-websocket.exe
[2021-07-02 16:37:06.431] [router] [debug] adding websocket endpoint at /
[2021-07-02 16:37:06.432] [router] [debug] adding websocket endpoint at /echo
[2021-07-02 16:37:06.433] [router] [debug] adding websocket endpoint at /timer
[2021-07-02 16:37:06.433] [debug] starting server.
[2021-07-02 16:37:06.434] [debug] starting i/o context.
[2021-07-02 16:40:31.448] [listener] [info] accepting incoming connection from 127.0.0.1:7026
[2021-07-02 16:40:31.449] [http_connection] [debug] launching plain connection.
[2021-07-02 16:40:31.449] [http_connection] [info] upgrading HTTP connection to WS connection.
[2021-07-02 16:40:31.449] [router] [debug] handling WS request: GET /timer
terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>'
  what():  End of file

Process finished with exit code 3

from malloy.

Tectu avatar Tectu commented on August 21, 2024

#40 is definitely something very vital for the future of this library and needs attention by itself.

I am currently unable to check boost.beast sourced/API but I do think that there is an overload that takes an error_code and/or async.

from malloy.

0x00002a avatar 0x00002a commented on August 21, 2024

Yes there is, I misunderstood the API there, I though the close_reason was filled and reported any errors but its meant to actually have a value (not sure if that might be part of the issue with websocat too). So yeah that code needs just plain fixing :p

from malloy.

Tectu avatar Tectu commented on August 21, 2024

hehe :p
are you going to submit a patch or should I put this on my ToDo list?

from malloy.

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.