File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 22
33setup (
44 name = 'unrealircd_rpc_py' ,
5- version = '1.0.3 ' ,
5+ version = '1.0.4 ' ,
66 packages = find_packages (),
77 install_requires = [
88 "requests>=2.25.1"
Original file line number Diff line number Diff line change @@ -76,9 +76,25 @@ async def __send_to_permanent_unixsocket(self):
7676
7777 sock .sendall (f'{ self .request } \r \n ' .encode ())
7878
79+ # Init batch variable
80+ batch = b''
81+
7982 while self .connected :
8083 # Recieve the data from the rpc server, decode it and split it
81- response = sock .recv (4096 ).decode ().split ('\n ' )
84+ response = sock .recv (4096 )
85+ if response [- 1 :] != b"\n " :
86+ # If END not recieved then fill the batch and go to next itteration
87+ batch += response
88+ continue
89+ else :
90+ # The EOF is found, include current response to the batch and continue the code
91+ batch += response
92+
93+ # Decode and split the response
94+ response = batch .decode ().split ("\n " )
95+
96+ # Clean batch variable
97+ batch = b''
8298
8399 for bdata in response :
84100 if bdata :
Original file line number Diff line number Diff line change 11{
2- "version" : " 1.0.3 "
2+ "version" : " 1.0.4 "
33}
You can’t perform that action at this time.
0 commit comments