Commit 3f3db7d
committed
client: socketPool should not be shared across clients
Caught this issue because of the new eviction tests. Essentially, this
change moves the socketPool into the client instance instead of a
reused variable at the module level.
When a client sends stop (or is evicted) the server will close the
websocket connection if that client is not in any other swarms (based
on peerId). However, if we are using a single socket for multiple
clients (as was the case before this commit), then other clients will
have their sockets unintentionally closed by the server.1 parent 806ce1d commit 3f3db7d
2 files changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
| |||
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
132 | | - | |
133 | | - | |
| 127 | + | |
| 128 | + | |
134 | 129 | | |
135 | 130 | | |
136 | 131 | | |
137 | | - | |
| 132 | + | |
138 | 133 | | |
139 | | - | |
140 | | - | |
| 134 | + | |
| 135 | + | |
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
| |||
182 | 177 | | |
183 | 178 | | |
184 | 179 | | |
185 | | - | |
| 180 | + | |
186 | 181 | | |
187 | | - | |
| 182 | + | |
188 | 183 | | |
189 | | - | |
| 184 | + | |
190 | 185 | | |
191 | 186 | | |
192 | 187 | | |
| |||
0 commit comments