@@ -898,16 +898,16 @@ async def initial_connection(self, data):
898
898
state .voice_port = data ['port' ]
899
899
state .endpoint_ip = data ['ip' ]
900
900
901
- packet = bytearray (70 )
902
- struct .pack_into ('>H' , packet , 0 , 1 ) # 1 = Send
903
- struct .pack_into ('>H' , packet , 2 , 70 ) # 70 = Length
901
+ packet = bytearray (74 )
902
+ struct .pack_into ('>H' , packet , 0 , 1 ) # 1 = Send
903
+ struct .pack_into ('>H' , packet , 2 , 70 ) # 70 = Length
904
904
struct .pack_into ('>I' , packet , 4 , state .ssrc )
905
905
state .socket .sendto (packet , (state .endpoint_ip , state .voice_port ))
906
- recv = await self .loop .sock_recv (state .socket , 70 )
906
+ recv = await self .loop .sock_recv (state .socket , 74 )
907
907
log .debug ('received packet in initial_connection: %s' , recv )
908
908
909
- # the ip is ascii starting at the 4th byte and ending at the first null
910
- ip_start = 4
909
+ # the ip is ascii starting at the 8th byte and ending at the first null
910
+ ip_start = 8
911
911
ip_end = recv .index (0 , ip_start )
912
912
state .ip = recv [ip_start :ip_end ].decode ('ascii' )
913
913
0 commit comments