JuliaWeb / WebSockets.jl

A WebSockets library for Julia
MIT License
158 stars 57 forks source link

updated to Julia 1.6 #183

Closed mind6 closed 1 year ago

mind6 commented 1 year ago

I'd like to see how the CI behaves on HTTP 0.9

mind6 commented 1 year ago

1.6LTS cannot perform the closing handshake, but the latest Julia can do it? What might cause connection reset in 1.6? 🤔

mind6 commented 1 year ago

I'm still attempting to find out why 1.6 doesn't do the closing handshake. Can I get logs of WebSockets.ServerWS instance once the server is running on another process?

In the test that's failing, the client is closing ws.socket "out of protocol". I think it's directly closing an HTTP.Stream instance rather than the WebSocket instance. So, it's not able to generate a WebSocket closing call on the server side, instead generates IOError and the ECONNRESET state.

This is what one might expect but, somehow In Julia 1.8 and later it's able to go through with the closing protocol. A mystery!

hustf commented 1 year ago

There's a disadvantage to multiple dispatch: It can often be hard to find out exactly which variant of 'close' is run when it's called. Logging is the better option in those cases. There's an example of logging to various files in '/benchmark/benchmark.jl', although there's probably a number of things not working there now.

hustf commented 1 year ago

No more improvements here, since you closed it?

mind6 commented 1 year ago

No more improvements here, since you closed it?

I'm going to go back to the master branch. I find it's not really stable with tests even on 1.8.3. Maybe we need a serious way to get in-order logs interlacing client and server debug messages?

hustf commented 1 year ago

Ok, thanks for the info. As far as I recall, finding out about the actual order of things was difficult and confusing for me. Embed time evaluation outside of the debug macro evaluation if you want to be sure of the sequence. Sometimes output is delayed because there is only one thread of execution in libuv. Also pay attention to time resolution. Good luck!