Comments (2)
SpdyConnection.writeSynReset(int, int)
and SpdyConnection.writeWindowUpdate(int, int)
are not problems because the class itself has synchronized
on the offending methods:
public synchronized void rstStream(int streamId, int statusCode) throws IOException { ... }
public synchronized void windowUpdate(int streamId, int deltaWindowSize) throws IOException { ... }
The close method is potentially worth synchronizing. But that would cause it to block waiting for the completion of any in-progress writes. The current behavior interrupts those writes which is what we want.
from okhttp.
These comments from SpdyConnection describe our concurrency policy. In future bug reports, please describe either a logic problem with these rules or a code violation of them!
// Internal state of this connection is guarded by 'this'. No blocking
// operations may be performed while holding this lock!
//
// Socket writes are guarded by spdyWriter.
//
// Socket reads are unguarded but are only made by the reader thread.
//
// Certain operations (like SYN_STREAM) need to synchronize on both the
// spdyWriter (to do blocking I/O) and this (to create streams). Such
// operations must synchronize on 'this' last. This ensures that we never
// wait for a blocking operation while holding 'this'.
from okhttp.
Related Issues (20)
- API suggestion: `buildMockResponse { }` HOT 2
- Fix HttpOverHttp2Test flakes and bad cache behaviour HOT 1
- Should SSLContext construction be deferred during OkHttpClient construction HOT 2
- Unexpected random crashes with java.lang.IllegalStateException: Unbalanced enter/exit HOT 8
- HTTPS request throught Proxy not working (but working fine with java.net) HOT 10
- Flaky test report
- IOException with "Connection reset" message causes loss of requests HOT 3
- Connection pool biased towards slow connections HOT 5
- Please build a new release of version 5 with fix https://github.com/square/okhttp/issues/8154
- removeHeader is not removing header HOT 1
- Get error when using okhttp4 and okio-3 HOT 2
- Inject a `Clock` to make `HttpLoggingInterceptor` easier to use in tests. HOT 2
- EOF exception while trying to close the websocket HOT 5
- Security issue: Information Exposure HOT 1
- Feature Request: Add decoders for `MultipartBody` and `FormBody` to `MockWebServer` HOT 2
- Unable to parse TLS packet header exception when using specific socks5 proxys HOT 1
- Potential failure on CallServerInterceptor if writeRequestHeader fails HOT 1
- Virtual thread pinning with 5.0.0-alpha.12 HOT 5
- Websocket connection failing few seconds after getting connected HOT 1
- How to cleanly pin a network HOT 1
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 okhttp.