mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-30 17:09:38 +00:00
Don't change state to same state
The comment already stated as much, but the code was broken.
This commit is contained in:
@@ -442,6 +442,7 @@
|
||||
if (state === oldstate) {
|
||||
// Already here, ignore
|
||||
Util.Debug("Already in state '" + state + "', ignoring");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -343,7 +343,10 @@ describe('Remote Frame Buffer Protocol Client', function() {
|
||||
describe('Page States', function () {
|
||||
describe('loaded', function () {
|
||||
var client;
|
||||
beforeEach(function () { client = make_rfb(); });
|
||||
beforeEach(function () {
|
||||
client = make_rfb();
|
||||
client._rfb_state = 'disconnected';
|
||||
});
|
||||
|
||||
it('should close any open WebSocket connection', function () {
|
||||
sinon.spy(client._sock, 'close');
|
||||
|
||||
Reference in New Issue
Block a user