diff -r b1d0964060b3 -r add4025ca678 gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Wed Aug 15 13:33:12 2007 +0100 +++ b/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Thu Aug 16 14:46:11 2007 +0100 @@ -13,6 +13,7 @@ import time import select +import fcntl import lib.utils as utils import lib.server as server @@ -76,12 +77,27 @@ return False try: + #p = select.poll() + #print outfd.fileno() + #p.register (connection, select.POLLNVAL | select.POLLERR | select.POLLHUP) while (self.proc and self.proc.poll() == None): - r, w, x = select.select([self.proc.stdout], [], [], 0) + r, w, x = select.select([self.proc.stdout], [], [], 1) if self.proc.stdout in r: progress = self.proc.stdout.readline() if (progress.find ("PROGRESS") >= 0): self.status = progress.split (":")[1] + elif (progress.find ("Erro") >= 0): + return False + """ + try: + print connection.getpeername() + print connection.getsockname() + except Esception, e: + print "Lost Connection" + self.stop () + return False + """ + except Exception, e: self.log.error(self.tid, "Problems handling data: %s" % e) return False