@replit/river 0.26.1 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-AYIMQWS7.js → chunk-AWCUCZY4.js} +2 -2
- package/dist/{chunk-XRI2BXMM.js → chunk-IV27BICV.js} +17 -4
- package/dist/chunk-IV27BICV.js.map +1 -0
- package/dist/{chunk-6UVTCZ6K.js → chunk-M5X4JTU3.js} +3 -3
- package/dist/{chunk-6UVTCZ6K.js.map → chunk-M5X4JTU3.js.map} +1 -1
- package/dist/{chunk-UQOD22AN.js → chunk-M75K5TJS.js} +2 -2
- package/dist/{chunk-UQOD22AN.js.map → chunk-M75K5TJS.js.map} +1 -1
- package/dist/{chunk-4W5LENT2.js → chunk-MREEJE3X.js} +2 -2
- package/dist/{chunk-M43R4RPL.js → chunk-NC54BC47.js} +90 -33
- package/dist/chunk-NC54BC47.js.map +1 -0
- package/dist/{chunk-IVNX5H6C.js → chunk-YQABPD3C.js} +14 -10
- package/dist/chunk-YQABPD3C.js.map +1 -0
- package/dist/{client-0f636b3a.d.ts → client-654098be.d.ts} +1 -3
- package/dist/{connection-07e97a79.d.ts → connection-bc2454dc.d.ts} +1 -1
- package/dist/{handshake-8752f79e.d.ts → handshake-1a86f06d.d.ts} +52 -38
- package/dist/router/index.cjs +1 -1
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +7 -7
- package/dist/router/index.d.ts +7 -7
- package/dist/router/index.js +2 -2
- package/dist/{server-e304daec.d.ts → server-9a6b5a8e.d.ts} +12 -4
- package/dist/{services-fc99aae1.d.ts → services-7daa60a0.d.ts} +2 -2
- package/dist/transport/impls/ws/client.cjs +102 -32
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +3 -3
- package/dist/transport/impls/ws/client.d.ts +3 -3
- package/dist/transport/impls/ws/client.js +5 -5
- package/dist/transport/impls/ws/server.cjs +99 -38
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +3 -3
- package/dist/transport/impls/ws/server.d.ts +3 -3
- package/dist/transport/impls/ws/server.js +5 -5
- package/dist/transport/index.cjs +112 -38
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/transport/index.js +5 -5
- package/dist/util/testHelpers.cjs +89 -32
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +3 -3
- package/dist/util/testHelpers.d.ts +3 -3
- package/dist/util/testHelpers.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-IVNX5H6C.js.map +0 -1
- package/dist/chunk-M43R4RPL.js.map +0 -1
- package/dist/chunk-XRI2BXMM.js.map +0 -1
- /package/dist/{chunk-AYIMQWS7.js.map → chunk-AWCUCZY4.js.map} +0 -0
- /package/dist/{chunk-4W5LENT2.js.map → chunk-MREEJE3X.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { b as ClientTransportOptions, C as Connection, j as EventHandler, E as EventMap, i as EventTypes, k as ProtocolError, l as ProtocolErrorType, c as ServerTransportOptions, S as Session, h as SessionConnected, f as SessionConnecting, g as SessionHandshaking, e as SessionNoConnection, d as SessionState, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-
|
|
2
|
-
export { C as ClientTransport } from '../client-
|
|
3
|
-
export { S as ServerTransport, a as SessionWaitingForHandshake } from '../server-
|
|
1
|
+
export { b as ClientTransportOptions, C as Connection, j as EventHandler, E as EventMap, i as EventTypes, k as ProtocolError, l as ProtocolErrorType, c as ServerTransportOptions, S as Session, h as SessionConnected, f as SessionConnecting, g as SessionHandshaking, e as SessionNoConnection, d as SessionState, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-1a86f06d.js';
|
|
2
|
+
export { C as ClientTransport } from '../client-654098be.js';
|
|
3
|
+
export { S as ServerTransport, a as SessionWaitingForHandshake } from '../server-9a6b5a8e.js';
|
|
4
4
|
export { b as OpaqueTransportMessage, O as OpaqueTransportMessageSchema, c as TransportClientId, a as TransportMessage, T as TransportMessageSchema, d as isStreamClose, i as isStreamOpen } from '../message-57296605.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import '../types-3e5768ec.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { b as ClientTransportOptions, C as Connection, j as EventHandler, E as EventMap, i as EventTypes, k as ProtocolError, l as ProtocolErrorType, c as ServerTransportOptions, S as Session, h as SessionConnected, f as SessionConnecting, g as SessionHandshaking, e as SessionNoConnection, d as SessionState, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-
|
|
2
|
-
export { C as ClientTransport } from '../client-
|
|
3
|
-
export { S as ServerTransport, a as SessionWaitingForHandshake } from '../server-
|
|
1
|
+
export { b as ClientTransportOptions, C as Connection, j as EventHandler, E as EventMap, i as EventTypes, k as ProtocolError, l as ProtocolErrorType, c as ServerTransportOptions, S as Session, h as SessionConnected, f as SessionConnecting, g as SessionHandshaking, e as SessionNoConnection, d as SessionState, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-1a86f06d.js';
|
|
2
|
+
export { C as ClientTransport } from '../client-654098be.js';
|
|
3
|
+
export { S as ServerTransport, a as SessionWaitingForHandshake } from '../server-9a6b5a8e.js';
|
|
4
4
|
export { b as OpaqueTransportMessage, O as OpaqueTransportMessageSchema, c as TransportClientId, a as TransportMessage, T as TransportMessageSchema, d as isStreamClose, i as isStreamOpen } from '../message-57296605.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import '../types-3e5768ec.js';
|
package/dist/transport/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientTransport
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-IV27BICV.js";
|
|
4
4
|
import {
|
|
5
5
|
ServerTransport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-YQABPD3C.js";
|
|
7
7
|
import {
|
|
8
8
|
Connection,
|
|
9
9
|
ProtocolError,
|
|
10
10
|
Transport
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-M5X4JTU3.js";
|
|
12
12
|
import "../chunk-TAH2GVTJ.js";
|
|
13
13
|
import {
|
|
14
14
|
SessionState
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-NC54BC47.js";
|
|
16
16
|
import {
|
|
17
17
|
OpaqueTransportMessageSchema,
|
|
18
18
|
TransportMessageSchema
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-M75K5TJS.js";
|
|
20
20
|
import "../chunk-4PVU7J25.js";
|
|
21
21
|
export {
|
|
22
22
|
ClientTransport,
|
|
@@ -460,7 +460,7 @@ function Err(error) {
|
|
|
460
460
|
var import_api = require("@opentelemetry/api");
|
|
461
461
|
|
|
462
462
|
// package.json
|
|
463
|
-
var version = "0.26.
|
|
463
|
+
var version = "0.26.2";
|
|
464
464
|
|
|
465
465
|
// tracing/index.ts
|
|
466
466
|
function createSessionTelemetryInfo(sessionId, to, from, propagationCtx) {
|
|
@@ -549,6 +549,7 @@ var defaultTransportOptions = {
|
|
|
549
549
|
sessionDisconnectGraceMs: 5e3,
|
|
550
550
|
connectionTimeoutMs: 2e3,
|
|
551
551
|
handshakeTimeoutMs: 1e3,
|
|
552
|
+
enableTransparentSessionReconnects: true,
|
|
552
553
|
codec: NaiveJsonCodec
|
|
553
554
|
};
|
|
554
555
|
var defaultConnectionRetryOptions = {
|
|
@@ -710,9 +711,32 @@ var IdentifiedSession = class extends CommonSession {
|
|
|
710
711
|
this.telemetry.span.end();
|
|
711
712
|
}
|
|
712
713
|
};
|
|
714
|
+
var IdentifiedSessionWithGracePeriod = class extends IdentifiedSession {
|
|
715
|
+
graceExpiryTime;
|
|
716
|
+
gracePeriodTimeout;
|
|
717
|
+
listeners;
|
|
718
|
+
constructor(props) {
|
|
719
|
+
super(props);
|
|
720
|
+
this.listeners = props.listeners;
|
|
721
|
+
this.graceExpiryTime = props.graceExpiryTime;
|
|
722
|
+
this.gracePeriodTimeout = setTimeout(() => {
|
|
723
|
+
this.listeners.onSessionGracePeriodElapsed();
|
|
724
|
+
}, this.graceExpiryTime - Date.now());
|
|
725
|
+
}
|
|
726
|
+
_handleStateExit() {
|
|
727
|
+
super._handleStateExit();
|
|
728
|
+
if (this.gracePeriodTimeout) {
|
|
729
|
+
clearTimeout(this.gracePeriodTimeout);
|
|
730
|
+
this.gracePeriodTimeout = void 0;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
_handleClose() {
|
|
734
|
+
super._handleClose();
|
|
735
|
+
}
|
|
736
|
+
};
|
|
713
737
|
|
|
714
738
|
// transport/sessionStateMachine/SessionConnecting.ts
|
|
715
|
-
var SessionConnecting = class extends
|
|
739
|
+
var SessionConnecting = class extends IdentifiedSessionWithGracePeriod {
|
|
716
740
|
state = "Connecting" /* Connecting */;
|
|
717
741
|
connPromise;
|
|
718
742
|
listeners;
|
|
@@ -745,8 +769,10 @@ var SessionConnecting = class extends IdentifiedSession {
|
|
|
745
769
|
}
|
|
746
770
|
_handleStateExit() {
|
|
747
771
|
super._handleStateExit();
|
|
748
|
-
|
|
749
|
-
|
|
772
|
+
if (this.connectionTimeout) {
|
|
773
|
+
clearTimeout(this.connectionTimeout);
|
|
774
|
+
this.connectionTimeout = void 0;
|
|
775
|
+
}
|
|
750
776
|
}
|
|
751
777
|
_handleClose() {
|
|
752
778
|
this.bestEffortClose();
|
|
@@ -755,26 +781,13 @@ var SessionConnecting = class extends IdentifiedSession {
|
|
|
755
781
|
};
|
|
756
782
|
|
|
757
783
|
// transport/sessionStateMachine/SessionNoConnection.ts
|
|
758
|
-
var SessionNoConnection = class extends
|
|
784
|
+
var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
|
|
759
785
|
state = "NoConnection" /* NoConnection */;
|
|
760
|
-
listeners;
|
|
761
|
-
gracePeriodTimeout;
|
|
762
|
-
constructor(props) {
|
|
763
|
-
super(props);
|
|
764
|
-
this.listeners = props.listeners;
|
|
765
|
-
this.gracePeriodTimeout = setTimeout(() => {
|
|
766
|
-
this.listeners.onSessionGracePeriodElapsed();
|
|
767
|
-
}, this.options.sessionDisconnectGraceMs);
|
|
768
|
-
}
|
|
769
786
|
_handleClose() {
|
|
770
787
|
super._handleClose();
|
|
771
788
|
}
|
|
772
789
|
_handleStateExit() {
|
|
773
790
|
super._handleStateExit();
|
|
774
|
-
if (this.gracePeriodTimeout) {
|
|
775
|
-
clearTimeout(this.gracePeriodTimeout);
|
|
776
|
-
this.gracePeriodTimeout = void 0;
|
|
777
|
-
}
|
|
778
791
|
}
|
|
779
792
|
};
|
|
780
793
|
|
|
@@ -828,7 +841,7 @@ var SessionWaitingForHandshake = class extends CommonSession {
|
|
|
828
841
|
};
|
|
829
842
|
|
|
830
843
|
// transport/sessionStateMachine/SessionHandshaking.ts
|
|
831
|
-
var SessionHandshaking = class extends
|
|
844
|
+
var SessionHandshaking = class extends IdentifiedSessionWithGracePeriod {
|
|
832
845
|
state = "Handshaking" /* Handshaking */;
|
|
833
846
|
conn;
|
|
834
847
|
listeners;
|
|
@@ -863,7 +876,10 @@ var SessionHandshaking = class extends IdentifiedSession {
|
|
|
863
876
|
this.conn.removeDataListener(this.onHandshakeData);
|
|
864
877
|
this.conn.removeErrorListener(this.listeners.onConnectionErrored);
|
|
865
878
|
this.conn.removeCloseListener(this.listeners.onConnectionClosed);
|
|
866
|
-
|
|
879
|
+
if (this.handshakeTimeout) {
|
|
880
|
+
clearTimeout(this.handshakeTimeout);
|
|
881
|
+
this.handshakeTimeout = void 0;
|
|
882
|
+
}
|
|
867
883
|
}
|
|
868
884
|
_handleClose() {
|
|
869
885
|
super._handleClose();
|
|
@@ -943,8 +959,10 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
943
959
|
}
|
|
944
960
|
onMessageData = (msg) => {
|
|
945
961
|
const parsedMsg = this.parseMsg(msg);
|
|
946
|
-
if (parsedMsg === null)
|
|
962
|
+
if (parsedMsg === null) {
|
|
963
|
+
this.listeners.onInvalidMessage("could not parse message");
|
|
947
964
|
return;
|
|
965
|
+
}
|
|
948
966
|
if (parsedMsg.seq !== this.ack) {
|
|
949
967
|
if (parsedMsg.seq < this.ack) {
|
|
950
968
|
this.log?.debug(
|
|
@@ -1001,7 +1019,7 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
1001
1019
|
};
|
|
1002
1020
|
|
|
1003
1021
|
// transport/sessionStateMachine/SessionBackingOff.ts
|
|
1004
|
-
var SessionBackingOff = class extends
|
|
1022
|
+
var SessionBackingOff = class extends IdentifiedSessionWithGracePeriod {
|
|
1005
1023
|
state = "BackingOff" /* BackingOff */;
|
|
1006
1024
|
listeners;
|
|
1007
1025
|
backoffTimeout;
|
|
@@ -1038,6 +1056,12 @@ function inheritSharedSession(session) {
|
|
|
1038
1056
|
log: session.log
|
|
1039
1057
|
};
|
|
1040
1058
|
}
|
|
1059
|
+
function inheritSharedSessionWithGrace(session) {
|
|
1060
|
+
return {
|
|
1061
|
+
...inheritSharedSession(session),
|
|
1062
|
+
graceExpiryTime: session.graceExpiryTime
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1041
1065
|
var SessionStateGraph = {
|
|
1042
1066
|
entrypoints: {
|
|
1043
1067
|
NoConnection: (to, from, listeners, options, log) => {
|
|
@@ -1051,6 +1075,7 @@ var SessionStateGraph = {
|
|
|
1051
1075
|
to,
|
|
1052
1076
|
seq: 0,
|
|
1053
1077
|
ack: 0,
|
|
1078
|
+
graceExpiryTime: Date.now() + options.sessionDisconnectGraceMs,
|
|
1054
1079
|
sendBuffer,
|
|
1055
1080
|
telemetry,
|
|
1056
1081
|
options,
|
|
@@ -1082,7 +1107,7 @@ var SessionStateGraph = {
|
|
|
1082
1107
|
transition: {
|
|
1083
1108
|
// happy path transitions
|
|
1084
1109
|
NoConnectionToBackingOff: (oldSession, backoffMs, listeners) => {
|
|
1085
|
-
const carriedState =
|
|
1110
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1086
1111
|
oldSession._handleStateExit();
|
|
1087
1112
|
const session = new SessionBackingOff({
|
|
1088
1113
|
backoffMs,
|
|
@@ -1099,7 +1124,7 @@ var SessionStateGraph = {
|
|
|
1099
1124
|
return session;
|
|
1100
1125
|
},
|
|
1101
1126
|
BackingOffToConnecting: (oldSession, connPromise, listeners) => {
|
|
1102
|
-
const carriedState =
|
|
1127
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1103
1128
|
oldSession._handleStateExit();
|
|
1104
1129
|
const session = new SessionConnecting({
|
|
1105
1130
|
connPromise,
|
|
@@ -1116,7 +1141,7 @@ var SessionStateGraph = {
|
|
|
1116
1141
|
return session;
|
|
1117
1142
|
},
|
|
1118
1143
|
ConnectingToHandshaking: (oldSession, conn, listeners) => {
|
|
1119
|
-
const carriedState =
|
|
1144
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1120
1145
|
oldSession._handleStateExit();
|
|
1121
1146
|
const session = new SessionHandshaking({
|
|
1122
1147
|
conn,
|
|
@@ -1193,9 +1218,12 @@ var SessionStateGraph = {
|
|
|
1193
1218
|
},
|
|
1194
1219
|
// disconnect paths
|
|
1195
1220
|
BackingOffToNoConnection: (oldSession, listeners) => {
|
|
1196
|
-
const carriedState =
|
|
1221
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1197
1222
|
oldSession._handleStateExit();
|
|
1198
|
-
const session = new SessionNoConnection({
|
|
1223
|
+
const session = new SessionNoConnection({
|
|
1224
|
+
listeners,
|
|
1225
|
+
...carriedState
|
|
1226
|
+
});
|
|
1199
1227
|
session.log?.info(
|
|
1200
1228
|
`session ${session.id} transition from BackingOff to NoConnection`,
|
|
1201
1229
|
{
|
|
@@ -1206,10 +1234,13 @@ var SessionStateGraph = {
|
|
|
1206
1234
|
return session;
|
|
1207
1235
|
},
|
|
1208
1236
|
ConnectingToNoConnection: (oldSession, listeners) => {
|
|
1209
|
-
const carriedState =
|
|
1237
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1210
1238
|
oldSession.bestEffortClose();
|
|
1211
1239
|
oldSession._handleStateExit();
|
|
1212
|
-
const session = new SessionNoConnection({
|
|
1240
|
+
const session = new SessionNoConnection({
|
|
1241
|
+
listeners,
|
|
1242
|
+
...carriedState
|
|
1243
|
+
});
|
|
1213
1244
|
session.log?.info(
|
|
1214
1245
|
`session ${session.id} transition from Connecting to NoConnection`,
|
|
1215
1246
|
{
|
|
@@ -1220,10 +1251,13 @@ var SessionStateGraph = {
|
|
|
1220
1251
|
return session;
|
|
1221
1252
|
},
|
|
1222
1253
|
HandshakingToNoConnection: (oldSession, listeners) => {
|
|
1223
|
-
const carriedState =
|
|
1254
|
+
const carriedState = inheritSharedSessionWithGrace(oldSession);
|
|
1224
1255
|
oldSession.conn.close();
|
|
1225
1256
|
oldSession._handleStateExit();
|
|
1226
|
-
const session = new SessionNoConnection({
|
|
1257
|
+
const session = new SessionNoConnection({
|
|
1258
|
+
listeners,
|
|
1259
|
+
...carriedState
|
|
1260
|
+
});
|
|
1227
1261
|
session.log?.info(
|
|
1228
1262
|
`session ${session.id} transition from Handshaking to NoConnection`,
|
|
1229
1263
|
{
|
|
@@ -1235,9 +1269,14 @@ var SessionStateGraph = {
|
|
|
1235
1269
|
},
|
|
1236
1270
|
ConnectedToNoConnection: (oldSession, listeners) => {
|
|
1237
1271
|
const carriedState = inheritSharedSession(oldSession);
|
|
1272
|
+
const graceExpiryTime = Date.now() + oldSession.options.sessionDisconnectGraceMs;
|
|
1238
1273
|
oldSession.conn.close();
|
|
1239
1274
|
oldSession._handleStateExit();
|
|
1240
|
-
const session = new SessionNoConnection({
|
|
1275
|
+
const session = new SessionNoConnection({
|
|
1276
|
+
listeners,
|
|
1277
|
+
graceExpiryTime,
|
|
1278
|
+
...carriedState
|
|
1279
|
+
});
|
|
1241
1280
|
session.log?.info(
|
|
1242
1281
|
`session ${session.id} transition from Connected to NoConnection`,
|
|
1243
1282
|
{
|
|
@@ -1254,24 +1293,42 @@ var ClientSessionStateGraph = {
|
|
|
1254
1293
|
entrypoint: SessionStateGraph.entrypoints.NoConnection,
|
|
1255
1294
|
transition: {
|
|
1256
1295
|
// happy paths
|
|
1296
|
+
// NoConnection -> BackingOff: attempt to connect
|
|
1257
1297
|
NoConnectionToBackingOff: transitions.NoConnectionToBackingOff,
|
|
1298
|
+
// BackingOff -> Connecting: backoff period elapsed, start connection
|
|
1258
1299
|
BackingOffToConnecting: transitions.BackingOffToConnecting,
|
|
1300
|
+
// Connecting -> Handshaking: connection established, start handshake
|
|
1259
1301
|
ConnectingToHandshaking: transitions.ConnectingToHandshaking,
|
|
1302
|
+
// Handshaking -> Connected: handshake complete, session ready
|
|
1260
1303
|
HandshakingToConnected: transitions.HandshakingToConnected,
|
|
1261
1304
|
// disconnect paths
|
|
1305
|
+
// BackingOff -> NoConnection: unused
|
|
1262
1306
|
BackingOffToNoConnection: transitions.BackingOffToNoConnection,
|
|
1307
|
+
// Connecting -> NoConnection: connection failed or connection timeout
|
|
1263
1308
|
ConnectingToNoConnection: transitions.ConnectingToNoConnection,
|
|
1309
|
+
// Handshaking -> NoConnection: connection closed or handshake timeout
|
|
1264
1310
|
HandshakingToNoConnection: transitions.HandshakingToNoConnection,
|
|
1311
|
+
// Connected -> NoConnection: connection closed
|
|
1265
1312
|
ConnectedToNoConnection: transitions.ConnectedToNoConnection
|
|
1313
|
+
// destroy/close paths
|
|
1314
|
+
// NoConnection -> x: grace period elapsed
|
|
1315
|
+
// BackingOff -> x: grace period elapsed
|
|
1316
|
+
// Connecting -> x: grace period elapsed
|
|
1317
|
+
// Handshaking -> x: grace period elapsed or invalid handshake message or handshake rejection
|
|
1318
|
+
// Connected -> x: grace period elapsed or invalid message
|
|
1266
1319
|
}
|
|
1267
1320
|
};
|
|
1268
1321
|
var ServerSessionStateGraph = {
|
|
1269
1322
|
entrypoint: SessionStateGraph.entrypoints.WaitingForHandshake,
|
|
1270
1323
|
transition: {
|
|
1271
1324
|
// happy paths
|
|
1325
|
+
// WaitingForHandshake -> Connected: handshake complete, session ready
|
|
1272
1326
|
WaitingForHandshakeToConnected: transitions.WaitingForHandshakeToConnected,
|
|
1273
1327
|
// disconnect paths
|
|
1328
|
+
// Connected -> NoConnection: connection closed
|
|
1274
1329
|
ConnectedToNoConnection: transitions.ConnectedToNoConnection
|
|
1330
|
+
// destroy/close paths
|
|
1331
|
+
// WaitingForHandshake -> x: handshake timeout elapsed or invalid handshake message or handshake rejection or connection closed
|
|
1275
1332
|
}
|
|
1276
1333
|
};
|
|
1277
1334
|
|