diff -r d35b50f4d77e -r fcf0bc36025a gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Thu Aug 16 14:45:22 2007 +0100 +++ b/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Fri Aug 17 19:28:10 2007 +0100 @@ -77,9 +77,9 @@ return False try: - #p = select.poll() + p = select.poll() #print outfd.fileno() - #p.register (connection, select.POLLNVAL | select.POLLERR | select.POLLHUP) + p.register (outfd, select.POLLNVAL | select.POLLERR | select.POLLHUP | select.POLLIN ) while (self.proc and self.proc.poll() == None): r, w, x = select.select([self.proc.stdout], [], [], 1) if self.proc.stdout in r: @@ -88,15 +88,12 @@ 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 - """ + + ret = p.poll(0) + if ret: + print "Lost Connection" + self.stop () + return False except Exception, e: self.log.error(self.tid, "Problems handling data: %s" % e)