Found by: Empus
Patch by: thommey and michaelortmann
Fixes:
One-line summary:
Fixes [20:20:20] !!! writing to nonexistent socket: 9 when using putlog() or other functions using sockets not available via thread local storage returned via threaddata() in python thread
Additional description (if needed):
Test cases demonstrating functionality (if applicable):
test.py:
import threading
import time
from eggdrop.tcl import putlog
def run_task():
def bg_task():
putlog("Inside background task bg_task()")
time.sleep(5)
putlog("Inside background task bg_task() 2")
try:
thread = threading.Thread(target=bg_task)
putlog("Starting thread...")
thread.start()
putlog("Thread started successfully")
except Exception as e:
putlog(f"Thread failed to start: {e}")
putlog("Loaded Python thread test.")
Found by: Empus Patch by: thommey and michaelortmann Fixes:
One-line summary: Fixes
[20:20:20] !!! writing to nonexistent socket: 9
when usingputlog()
or other functions using sockets not available via thread local storage returned viathreaddata()
in python threadAdditional description (if needed):
Test cases demonstrating functionality (if applicable): test.py:
Terminal 1:
Terminal 2: