JavaScript code formatting.
this.outgoing = function(message) {
switch (message.channel) {
- case '/meta/handshake':
- {
+ case '/meta/handshake': {
_state = {};
_state.url = _cometd.getURL();
}
break;
}
- case '/meta/connect':
- {
+ case '/meta/connect': {
if (_reloading === true) {
// The reload causes the failure of the outstanding /meta/connect,
// which CometD will react to by sending another. Here we avoid
}
break;
}
- case '/meta/disconnect':
- {
+ case '/meta/disconnect': {
_state = {};
break;
}
- default:
- {
+ default: {
break;
}
}
this.incoming = function(message) {
switch (message.channel) {
- case '/meta/handshake':
- {
+ case '/meta/handshake': {
// Only record the handshake response if it's successful.
if (message.successful) {
// If the handshake response is already present, then we're replaying it.
}
break;
}
- case '/meta/connect':
- {
+ case '/meta/connect': {
if (_batch) {
_batch = false;
_cometd.endBatch();
}
break;
}
- case '/meta/disconnect':
- {
+ case '/meta/disconnect': {
if (_batch) {
_batch = false;
_cometd.endBatch();
_state = {};
break;
}
- default:
- {
+ default: {
break;
}
}
