Comments (4)
Both shutdown
and {shutdown, _}
should result in a NO_ERROR.
from gun.
Protocol:closing/4
is only called from gun:closing/2
which is internal. gun:closing/2
is only ever called with 'shutdown' and 'owner_down' from within the same module. Thus, I believe handling of any other reason is dead code.
This 'closing' reason is not the same as the exit reason used elsewhere, for example in disconnect/2.
from gun.
Yes as far as the code is currently implemented only shutdown
needs to be handled. But in the future it would be better to handle sys:terminate
or EXIT
signals properly and in that case both shutdown
and the tuple should result in a NO_ERROR. But for now a smaller patch is fine.
from gun.
To handle supervisor shutting down gun connections, EXIT and sys:terminate, we would need to use trap exit. I think it would be good to have, but it's a larger change. I made a PR with only a minimal fix.
from gun.
Related Issues (20)
- Problem using an HTTP proxy HOT 2
- Strange behavior on ARM processors HOT 2
- gun:connect expects proxy server to reply with HTTP/1.1, some servers respond with HTTP/1.0 HOT 3
- gun 2.0 RC ready? HOT 7
- HTTP2 gun_down event only delivered the connection owner but not to streams HOT 2
- Exposing HTTP2 "additional debug data" in received GOAWAY frames HOT 4
- Crash during termination when connecting to a server requiring mTLS over HTTP/2 HOT 17
- Feature: Response callback fun HOT 4
- Add stream idle timeout HOT 2
- Websocket upgrade fails on unix socket HOT 4
- function not exported {gun_http,ws_send,6} HOT 3
- Downgrade response time HTTP-2 after 1.3.0 to 2.0.1 HOT 26
- client_preferred_next_protocols is incompatible with TLS 1.3 HOT 1
- Types not exported - dialyzer fails
- timeout to connect to ws.postman-echo.com:443 HOT 6
- {:stream_error, :protocol_error, :"Stream reset by server."} HOT 5
- gun:open times out in OTP/26 for tls if tls options are not set HOT 9
- Update erlang.mk to support OTP 27 HOT 1
- Document gotchas using Gun from multiple entities using HTTP/2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gun.