Commit 6af2e6d
WebSocketModule uses OkHttpClientProvider (#55885)
Summary:
Pull Request resolved: #55885
Instead of creating a brand-new OkHttpClient.Builder() per WebSocket
connection, derive from OkHttpClientProvider.getOkHttpClient() so
that all connections share the same connection pool and dispatcher.
Also remove the dispatcher shutdown call, since the dispatcher is now
shared with the global OkHttpClient and shutting it down would kill
all connections.
Changelog: [Internal]
Reviewed By: cipolleschi, javache
Differential Revision: D950591161 parent 9758736 commit 6af2e6d
1 file changed
Lines changed: 3 additions & 4 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
| |||
0 commit comments