CodeWithSwastik / Dashboard-Tutorials

This will contain all the code for the Dashboard Tutorial series by me.
47 stars 53 forks source link

Call ipc function more than once breaks #5

Open davidpicon7 opened 3 years ago

davidpicon7 commented 3 years ago

If you try to call some ipc function more than once, second time returns an Error and after that conections closes.

Daftscientist commented 3 years ago

this is bc swas is an idiot

davidpicon7 commented 3 years ago

I made a workarround to work in django, modifying the client.py (from ext-ipc library) (line 95):

#        if not self.session:
        await self.init_sock()

and last 2 lines:

        await self.websocket.close()
        return json.loads(recv.data)