Skip to content

Commit 3e50634

Browse files
committed
fix: terminate connection on connect failure to prevent socket leak
1 parent 985f123 commit 3e50634

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

nxc/protocols/rdp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ async def execute_shell(self, payload, get_output, shell_type):
590590
await self.connect_rdp()
591591
except Exception as e:
592592
self.logger.debug(f"Error connecting to RDP: {e!s}")
593+
await self.terminate_conn()
593594
return None
594595

595596
try:

0 commit comments

Comments
 (0)