mirror of
https://git.proxmox.com/git/mirror_novnc
synced 2025-08-04 23:13:52 +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:
parent
7d714b15f5
commit
4cfd49c8c3
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user