diff --git a/src/rpc.rs b/src/rpc.rs index 81601d34fe..dccf3af7eb 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -582,7 +582,7 @@ mod tests { } #[test] - fn test_rpc_request_airdrop() { + fn test_rpc_fail_request_airdrop() { let bob_pubkey = Keypair::new().pubkey(); let (io, meta, _last_id, _alice_keypair) = start_rpc_handler_with_tx(bob_pubkey); diff --git a/src/wallet.rs b/src/wallet.rs index 396d2ef653..f5a3f98d09 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -643,7 +643,7 @@ pub fn request_airdrop( tokens: u64, ) -> Result { // TODO: make this async tokio client - let mut stream = TcpStream::connect(drone_addr)?; + let mut stream = TcpStream::connect_timeout(drone_addr, Duration::new(3, 0))?; stream.set_read_timeout(Some(Duration::new(10, 0)))?; let req = DroneRequest::GetAirdrop { airdrop_request_amount: tokens,