You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2022. It is now read-only.
Currently the way we associate incoming connections with the correct peer on the root channel is by reaching into the channel when we finish the init handshake for incoming connections.
TChannelConnection.prototype.onInIdentified=functiononInIdentified(init){varself=this;if(init.hostPort==='0.0.0.0:0'){self.ephemeral=true;self.remoteName=''+self.socket.remoteAddress+':'+self.socket.remotePort;assert(self.remoteName!==self.channel.hostPort,'should not be able to receive ephemeral connection from self');}else{self.remoteName=init.hostPort;}self.channel.peers.add(self.remoteName).addConnection(self);self.identifiedEvent.emit(self,{hostPort: self.remoteName,processName: init.processName});};
Note that there is a horrible bug here where we completely ignore the peer.draining and peer.closing state and just blindly addConnection.
Either we should check the state here or make addConnection more world class.
The text was updated successfully, but these errors were encountered:
Currently the way we associate incoming connections with the correct peer on the root channel is by reaching into the channel when we finish the init handshake for incoming connections.
See https://github.com/uber/tchannel-node/blob/master/connection.js#L466-L482
Note that there is a horrible bug here where we completely ignore the
peer.draining
andpeer.closing
state and just blindly addConnection.Either we should check the state here or make addConnection more world class.
The text was updated successfully, but these errors were encountered: