Add test for two messages with the same key. Fixes to clean shutdown and server-side message duplication.

This commit is contained in:
Ian Gulliver
2014-05-15 16:30:08 +03:00
parent 1e755c9693
commit 3f0b7db9dd
3 changed files with 69 additions and 5 deletions

View File

@@ -448,7 +448,9 @@ Cosmopolite.prototype.onServerEvent_ = function(e) {
*/
Cosmopolite.prototype.onSocketError_ = function(msg) {
console.log('cosmopolite: socket error:', msg);
this.socket_.close();
if (this.socket_) {
this.socket_.close();
}
};
/* Exported values */