mirror of https://github.com/grpc/grpc-node.git
				
				
				
			Actually add listening http2 servers to server list
This commit is contained in:
		
							parent
							
								
									3cbb46b1f7
								
							
						
					
					
						commit
						96d4d6acba
					
				|  | @ -271,6 +271,7 @@ export class Server { | |||
|           http2Server.once('error', onError); | ||||
| 
 | ||||
|           http2Server.listen(addr, () => { | ||||
|             this.http2ServerList.push(http2Server); | ||||
|             const boundAddress = http2Server.address()!; | ||||
|             if (typeof boundAddress === 'string') { | ||||
|               resolve(portNum); | ||||
|  | @ -311,6 +312,7 @@ export class Server { | |||
|         http2Server.once('error', onError); | ||||
| 
 | ||||
|         http2Server.listen(address, () => { | ||||
|           this.http2ServerList.push(http2Server); | ||||
|           resolve(bindSpecificPort(addressList.slice(1), (http2Server.address() as AddressInfo).port, 1)); | ||||
|           http2Server.removeListener('error', onError); | ||||
|         }); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue