Commit 2ee56fa
WebSocketModule uses OkHttpClientProvider
Summary:
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]
Differential Revision: D950591161 parent 346d771 commit 2ee56fa
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