Regression: Reconnection not working properly due to changes on ECHD Proxy (#21741)
parent
47a61f2523
commit
a3656b3304
@ -1,4 +1,15 @@ |
||||
import { ClientStream } from 'meteor/socket-stream-client'; |
||||
|
||||
ClientStream.prototype.connectionAllowed = false; |
||||
ClientStream.prototype.allowConnection = function(allow = true) { |
||||
this.connectionAllowed = allow; |
||||
this._launchConnection(); |
||||
}; |
||||
|
||||
ClientStream.prototype._launchConnectionAsync = ClientStream.prototype._launchConnection; |
||||
ClientStream.prototype._launchConnection = function() {}; |
||||
ClientStream.prototype._launchConnection = function() { |
||||
if (!this.connectionAllowed) { |
||||
return; |
||||
} |
||||
this._launchConnectionAsync(); |
||||
}; |
||||
|
||||
Loading…
Reference in new issue