ugh, nasty bug where if an exception is raised during on_client_data in which the client was shut down, the select loop will still state that the client has data to be processed, which causes an exception to be raised, starting to loop over again

git-svn-id: file:///home/svn/incoming/trunk@3496 4d416f70-5f16-0410-b530-b9f4589650da
unstable
bmc 2006-02-03 19:54:08 +00:00
parent fe608d1676
commit f5affd4b41
1 changed files with 8 additions and 1 deletions

View File

@ -161,7 +161,14 @@ protected
sd = Rex::ThreadSafe.select(clients)
sd[0].each { |fd|
on_client_data(fd)
begin
on_client_data(fd)
rescue
elog("Error in stream server client monitor: #{$!}")
rlog(ExceptionCallStack)
ensure
close_client(fd)
end
}
rescue
elog("Error in stream server client monitor: #{$!}")