merge and kill task fixes
This commit is contained in:
@@ -50,7 +50,7 @@ def is_dashboard_process(proc):
|
||||
|
||||
# Check if it's using one of our dashboard ports
|
||||
try:
|
||||
connections = proc.connections()
|
||||
connections = proc.net_connections()
|
||||
for conn in connections:
|
||||
if hasattr(conn, 'laddr') and conn.laddr:
|
||||
if conn.laddr.port in DASHBOARD_PORTS:
|
||||
@@ -98,7 +98,7 @@ def find_processes_on_ports():
|
||||
|
||||
for proc in psutil.process_iter(['pid', 'name']):
|
||||
try:
|
||||
connections = proc.connections()
|
||||
connections = proc.net_connections()
|
||||
for conn in connections:
|
||||
if hasattr(conn, 'laddr') and conn.laddr:
|
||||
if conn.laddr.port in DASHBOARD_PORTS and conn.status == 'LISTEN':
|
||||
@@ -192,7 +192,7 @@ def main():
|
||||
port_free = True
|
||||
for proc in psutil.process_iter():
|
||||
try:
|
||||
for conn in proc.connections():
|
||||
for conn in proc.net_connections():
|
||||
if hasattr(conn, 'laddr') and conn.laddr:
|
||||
if conn.laddr.port == port and conn.status == 'LISTEN':
|
||||
print(f" Port {port}: IN USE by PID {proc.pid}")
|
||||
|
||||
Reference in New Issue
Block a user