Comments (6)
Thank you very much for a prompt and good answer! This project is great!
I of course should have returned the new conn
, now everything works as expected!
My thought was that since the docs says that the body is read out of the socket I did not think there was anything in the conn
that was updated and then did not even think that the new conn
was needed.. Silly me..
But then I know a bunch more about the inner workings of both Plug
and Bandit
Thanks!
from bandit.
from bandit.
Are you 100% certain you're not rebinding conn
on every call into Plug.Conn
functions? This looks exactly like that's the case
from bandit.
Here's your problem:
https://github.com/m0rt3nlund/bandit_test/blob/main/lib/teste_web/controllers/page_controller.ex#L38
You need to rebind conn
on every call - Bandit keeps important things in there
from bandit.
Cowboy gets away with this in some cases because they smear connection state across a few processes so you won't always see this (but you will sometimes; it depends on where you're not rebinding). Bandit is very much intentionally a single-process-per-connection design, so we're more sensitive to rebinding.
Regardless, the Plug contract is clear on this; you need to track and rebind returned conn values for correctness.
from bandit.
Closing for hygiene. Thanks for the report!
from bandit.
Related Issues (20)
- Missing measurements in telemetry events HOT 6
- Plug.Conn is not closed when user closes the browser's tab (SSE) HOT 15
- High CPU usage HOT 2
- Compression configuration options HOT 1
- Clearing process dictionary breaks on some keys HOT 2
- Bandit + Phoenix LiveView on Safari iOS Fails to Reconnect HOT 6
- More examples in documentation HOT 1
- Otel question HOT 2
- Exceptions get logged from Firefox client, but not from cURL HOT 11
- Lots of `(Bandit.HTTPError) closed` errors HOT 7
- Consider sticking to semantic versioning HOT 3
- (UndefinedFunctionError) function Bandit.WebSocket.Socket.close/2 is undefined or private HOT 3
- Bandit from 1.3 to 1.5 ENOTCONN errors HOT 5
- Performance Cowboy 2 vs Bandit Phoenix adapter HOT 4
- Advice for dealing with `(Bandit.HTTPError) closed` not covered by `log_protocol_errors` HOT 13
- The Proxy Protocol for Bandit? HOT 3
- HTTP1 socket might be overly tolerant of socket timeout error HOT 7
- `Received END_STREAM with byte still pending` HOT 7
- Very slow WebSocket binary frame parsing with Firefox client HOT 6
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 bandit.