Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FunnyWolf committed Jul 28, 2023
1 parent 642c930 commit e603eae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/rex/proto/proxy/socks5/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def stop
# stop any clients we have (create a new client array as client.stop will delete from @clients)
clients = @clients.dup
clients.each do | client |
client.stop
begin
client.stop
rescue
wlog("SOCKS5 clients stop - #{$!}")
end
end
# close the server socket
@server.close if @server
Expand Down
6 changes: 5 additions & 1 deletion lib/rex/proto/proxy/socks5/server_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ def relay(relay_client, relay_sock)
end

if closed
@relay_client.stop
begin
@relay_client.stop
rescue
wlog("SOCKS5 @relay_client.stop - #{$!}")
end
::Thread.exit
end
end
Expand Down

0 comments on commit e603eae

Please sign in to comment.