Comments (3)
This is the behavior mandated by RFC 6455:
The underlying TCP connection, in most normal cases, SHOULD be closed
first by the server, so that it holds the TIME_WAIT state and not the
client (as this would prevent it from re-opening the connection for 2
maximum segment lifetimes (2MSL), while there is no corresponding
server impact as a TIME_WAIT connection is immediately reopened upon
a new SYN with a higher seq number). In abnormal cases (such as not
having received a TCP Close from the server after a reasonable amount
of time) a client MAY initiate the TCP Close. As such, when a server
is instructed to Close the WebSocket Connection it SHOULD initiate
a TCP Close immediately, and when a client is instructed to do the
same, it SHOULD wait for a TCP Close from the server.
If your server doesn't close the TCP connection immediately, then that's a bug in your server.
from websockets.
Of course, if the server is websockets, then that's a bug in websockets. I don't think that's the case because your issue refers only to the client side and because the TCP connection close behaviors are tested quite extensively in websockets' test suite.
from websockets.
Of course, if the server is websockets, then that's a bug in websockets. I don't think that's the case because your issue refers only to the client side and because the TCP connection close behaviors are tested quite extensively in websockets' test suite.
The server is written in Rust, so I will look into that. Thanks!
from websockets.
Related Issues (20)
- Sync version of broadcast HOT 2
- Running Scheduled Task in Websokcets Or Scaling with multiple workers HOT 1
- await websocket.recv() block the coroutine loop. HOT 1
- When using websockets as a client, how to send a pong when receiving a ping? HOT 1
- Make MAX_LINE configurable HOT 5
- When I use websocket to transmit continuous audio pcm data to the server, half of the data is lost HOT 1
- websocket over stomp received Session closed error HOT 5
- Connection breaks in between during a sustained transfer HOT 9
- When there are N channels in a group, sending a message to the group will be sent N times HOT 1
- Asking for Guidance in Writing a WebsocketHandler for the Python logging Module HOT 3
- iOS and WebSockets: 0 bytes read/no close frame received/code 1006? HOT 5
- question: intended behavior with failed auth and async for auto-reconnect HOT 28
- Clean up tests on PyPy HOT 4
- Inconsistent raw frames when sending a custom text frame with an empty body HOT 3
- Expose list of connections as an attribute of WebSocketServer HOT 1
- Threading server should close connections on exit
- Respond with HTP 414 or 431 when exceeding security limits
- Multiple clients from localhost HOT 2
- speedups.c is missing from the 13.0 source distribution HOT 4
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 websockets.