Speedup to local relay

git-svn-id: file:///home/svn/framework3/trunk@5358 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2008-01-26 22:17:59 +00:00
parent ce797ee523
commit 31d121da82
2 changed files with 7 additions and 4 deletions

View File

@ -342,7 +342,8 @@ protected
rfd.other_stream = lfd
self.rfds << lfd
self.rfds << rfd
self.rfds << rfd
# Otherwise, we don't have both sides, we'll close them.
else
close_relay_conn(lfd)
@ -353,11 +354,13 @@ protected
# Monitors the relays for data and passes it in both directions.
#
def monitor_relays
begin
begin
# Helps with latency
Thread.current.priority = 2
# Poll all the streams...
begin
socks = select(rfds, nil, nil, 0.2)
socks = select(rfds, nil, nil, 0.25)
rescue StreamClosedError => e
dlog("monitor_relays: closing stream #{e.stream}", 'rex', LEV_3)

View File

@ -1,5 +1,5 @@
##
# $Id:$
# $Id$
##
##