wasm fixes
This commit is contained in:
		| @@ -109,7 +109,7 @@ impl Network { | |||||||
|  |  | ||||||
|         // Network accounting |         // Network accounting | ||||||
|         self.network_manager() |         self.network_manager() | ||||||
|             .stats_packet_sent(dial_info.to_ip_addr(), data_len as u64); |             .stats_packet_sent(dial_info.to_ip_addr(), ByteCount::new(data_len as u64)); | ||||||
|  |  | ||||||
|         Ok(NetworkResult::Value(())) |         Ok(NetworkResult::Value(())) | ||||||
|     } |     } | ||||||
| @@ -152,7 +152,7 @@ impl Network { | |||||||
|  |  | ||||||
|                 network_result_try!(pnc.send(data).await.wrap_err("send failure")?); |                 network_result_try!(pnc.send(data).await.wrap_err("send failure")?); | ||||||
|                 self.network_manager() |                 self.network_manager() | ||||||
|                     .stats_packet_sent(dial_info.to_ip_addr(), data_len as u64); |                     .stats_packet_sent(dial_info.to_ip_addr(), ByteCount::new(data_len as u64)); | ||||||
|  |  | ||||||
|                 let out = network_result_try!(network_result_try!(timeout(timeout_ms, pnc.recv()) |                 let out = network_result_try!(network_result_try!(timeout(timeout_ms, pnc.recv()) | ||||||
|                     .await |                     .await | ||||||
| @@ -160,7 +160,7 @@ impl Network { | |||||||
|                 .wrap_err("recv failure")?); |                 .wrap_err("recv failure")?); | ||||||
|  |  | ||||||
|                 self.network_manager() |                 self.network_manager() | ||||||
|                     .stats_packet_rcvd(dial_info.to_ip_addr(), out.len() as u64); |                     .stats_packet_rcvd(dial_info.to_ip_addr(), ByteCount::new(out.len() as u64)); | ||||||
|  |  | ||||||
|                 Ok(NetworkResult::Value(out)) |                 Ok(NetworkResult::Value(out)) | ||||||
|             } |             } | ||||||
| @@ -194,7 +194,7 @@ impl Network { | |||||||
|                     // Network accounting |                     // Network accounting | ||||||
|                     self.network_manager().stats_packet_sent( |                     self.network_manager().stats_packet_sent( | ||||||
|                         descriptor.remote().to_socket_addr().ip(), |                         descriptor.remote().to_socket_addr().ip(), | ||||||
|                         data_len as u64, |                         ByteCount::new(data_len as u64), | ||||||
|                     ); |                     ); | ||||||
|  |  | ||||||
|                     // Data was consumed |                     // Data was consumed | ||||||
| @@ -243,7 +243,7 @@ impl Network { | |||||||
|  |  | ||||||
|         // Network accounting |         // Network accounting | ||||||
|         self.network_manager() |         self.network_manager() | ||||||
|             .stats_packet_sent(dial_info.to_ip_addr(), data_len as u64); |             .stats_packet_sent(dial_info.to_ip_addr(), ByteCount::new(data_len as u64)); | ||||||
|  |  | ||||||
|         Ok(NetworkResult::value(connection_descriptor)) |         Ok(NetworkResult::value(connection_descriptor)) | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -16,7 +16,6 @@ use js_sys::*; | |||||||
| use lazy_static::*; | use lazy_static::*; | ||||||
| use send_wrapper::*; | use send_wrapper::*; | ||||||
| use serde::*; | use serde::*; | ||||||
| use tracing::*; |  | ||||||
| use tracing_subscriber::prelude::*; | use tracing_subscriber::prelude::*; | ||||||
| use tracing_subscriber::*; | use tracing_subscriber::*; | ||||||
| use tracing_wasm::{WASMLayerConfigBuilder, *}; | use tracing_wasm::{WASMLayerConfigBuilder, *}; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user