File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ impl Shard {
458458 } ) => self
459459 . handle_gateway_dispatch ( seq, data, & original_str)
460460 . map ( |e| Some ( ShardAction :: Dispatch ( e) ) ) ,
461- Ok ( GatewayEvent :: Heartbeat ( .. ) ) => {
461+ Ok ( GatewayEvent :: Heartbeat ) => {
462462 info ! ( "[{:?}] Received shard heartbeat" , self . shard_info) ;
463463
464464 Ok ( Some ( ShardAction :: Heartbeat ) )
Original file line number Diff line number Diff line change @@ -937,7 +937,7 @@ pub enum GatewayEvent {
937937 // Used for debugging, if the data cannot be deserialised.
938938 original_str : FixedString ,
939939 } ,
940- Heartbeat ( # [ deprecated = "always 0 because it is never provided by the gateway" ] u64 ) ,
940+ Heartbeat ,
941941 Reconnect ,
942942 /// Whether the session can be resumed.
943943 InvalidateSession ( bool ) ,
@@ -959,11 +959,7 @@ impl<'de> Deserialize<'de> for GatewayEvent {
959959 data : map,
960960 }
961961 } ,
962- Opcode :: Heartbeat => {
963- // Placeholder value. Discord expects the last Dispatch
964- // sequence number and doesn't send it with the heartbeat.
965- Self :: Heartbeat ( 0 )
966- } ,
962+ Opcode :: Heartbeat => Self :: Heartbeat ,
967963 Opcode :: InvalidSession => Self :: InvalidateSession ( remove_from_map ( & mut map, "d" ) ?) ,
968964 Opcode :: Hello => {
969965 #[ derive( Deserialize ) ]
You can’t perform that action at this time.
0 commit comments