| 
					
				 | 
			
			
				@@ -1,6 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- * Copyright 2015, Google Inc. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Copyright 2015-2016, Google Inc. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * All rights reserved. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * Redistribution and use in source and binary forms, with or without 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -952,6 +952,7 @@ describe('Call propagation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   describe('Cancellation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('With a unary call', function(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       done = multiDone(done, 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      var call; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy_impl.unary = function(parent, callback) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         client.unary(parent.request, function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           try { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -969,12 +970,13 @@ describe('Call propagation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy.start(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var proxy_client = new Client('localhost:' + proxy_port, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     grpc.credentials.createInsecure()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      var call = proxy_client.unary({}, function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      call = proxy_client.unary({}, function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         done(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('With a client stream call', function(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       done = multiDone(done, 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      var call; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy_impl.clientStream = function(parent, callback) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         client.clientStream(function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           try { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -992,12 +994,13 @@ describe('Call propagation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy.start(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var proxy_client = new Client('localhost:' + proxy_port, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     grpc.credentials.createInsecure()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      var call = proxy_client.clientStream(function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      call = proxy_client.clientStream(function(err, value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         done(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('With a server stream call', function(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       done = multiDone(done, 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      var call; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy_impl.serverStream = function(parent) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         var child = client.serverStream(parent.request, null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         {parent: parent}); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1013,13 +1016,14 @@ describe('Call propagation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy.start(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var proxy_client = new Client('localhost:' + proxy_port, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     grpc.credentials.createInsecure()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      var call = proxy_client.serverStream({}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      call = proxy_client.serverStream({}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       call.on('error', function(err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         done(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('With a bidi stream call', function(done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       done = multiDone(done, 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      var call; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy_impl.bidiStream = function(parent) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         var child = client.bidiStream(null, {parent: parent}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         child.on('error', function(err) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1034,7 +1038,7 @@ describe('Call propagation', function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       proxy.start(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       var proxy_client = new Client('localhost:' + proxy_port, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     grpc.credentials.createInsecure()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      var call = proxy_client.bidiStream(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      call = proxy_client.bidiStream(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       call.on('error', function(err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         done(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 |