Commit bd03b52
committed
feat(sdk): eager DDPSDK connect, drop Meteor fallback from sdk.call/publish/stream
DDPSDK's Connection buffers outgoing messages until the WebSocket
handshake completes, so downstream call sites don't actually need an
isDdpSdkReady gate. Open the socket as soon as getDdpSdk() runs and
drop the Meteor fallback from sdk.call / sdk.publish / the stream
factory.
Pre-authentication, anonymous methods / streams still work (the SDK
queues them and flushes on 'connected'); authenticated methods will
surface a server auth error the same way an unauthenticated Meteor
call would. userIdStore continues to drive loginWithToken so the SDK
becomes authenticated as soon as either session resume or a fresh
login sets a uid.
createNewMeteorStream stays in the file for now (no longer reachable)
— removing it and the Meteor._stream('message') listener is left for
the cleanup pass once Meteor.connection is fully neutralised.1 parent 78a4bf9 commit bd03b52
2 files changed
Lines changed: 20 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
272 | | - | |
273 | | - | |
| 271 | + | |
274 | 272 | | |
275 | 273 | | |
276 | 274 | | |
| |||
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | 323 | | |
331 | 324 | | |
332 | 325 | | |
333 | 326 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
339 | 330 | | |
340 | 331 | | |
341 | 332 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 333 | + | |
346 | 334 | | |
347 | 335 | | |
348 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments