File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ def __init__(self):
2121 self .socket : socket .socket = None
2222
2323 def connect (self ):
24- if self .socket is None :
25- self .socket = socket .socket (socket .AF_UNIX , socket .SOCK_STREAM )
24+ if self .socket is not None :
25+ log .debug ("Socket already connected, disconnecting first." )
26+ self .disconnect ()
27+ self .socket = socket .socket (socket .AF_UNIX , socket .SOCK_STREAM )
2628 self .socket .settimeout (SOCKET_CONNECT_TIMEOUT )
2729 base_path = path = (
2830 os .environ .get ("XDG_RUNTIME_DIR" )
@@ -35,9 +37,11 @@ def connect(self):
3537 for i in range (MAX_IPC_SOCKET_RANGE ):
3638 path = base_path .format (i )
3739 try :
40+ log .debug (f"Attempting to connect to socket at path: { path } " )
3841 self .socket .connect (path )
3942 break
4043 except FileNotFoundError :
44+ log .warning (f"socket { path } not found, trying next socket." )
4145 pass
4246 except Exception as ex :
4347 log .error (
@@ -47,6 +51,7 @@ def connect(self):
4751 pass
4852 else :
4953 raise DiscordNotOpened
54+ log .debug (f"Connected to socket at path: { path } " )
5055 self .socket .setblocking (False )
5156
5257 def disconnect (self ):
Original file line number Diff line number Diff line change 11{
2- "version" : " 1.11.0 " ,
2+ "version" : " 1.11.1 " ,
33 "thumbnail" : " store/thumbnail.png" ,
44 "id" : " com_imdevinc_StreamControllerDiscordPlugin" ,
5- "name" : " Discord - Debug " ,
5+ "name" : " Discord" ,
66 "author" : " ImDevinC" ,
77 "github" : " https://github.com/ImDevinC/StreamControllerDiscordPlugin" ,
88 "tags" : [
You can’t perform that action at this time.
0 commit comments