ThreadingTCPServer not working

Gustavo Niemeyer niemeyer at conectiva.com
Fri Jun 1 21:58:41 EDT 2001


Hello!!

Does anyone know if something is wrong here, or I'm just doing
something stupid?

Python 2.1 (#1, May  8 2001, 16:26:24)
[GCC 2.95.3 20010315 (release) (conectiva)] on linux-i386
Type "copyright", "credits" or "license" for more information.
>>> import SocketServer
>>> import BaseHTTPServer
>>> s = SocketServer.ThreadingTCPServer(("localhost", 8000),
BaseHTTPServer.BaseHTTPRequestHandler)
>>> s.serve_forever()

Then, when trying to connect:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/var/tmp/python-2.1-root/usr/lib/python2.1/threading.py", line 378, in __bootstrap
    self.run()
  File "/var/tmp/python-2.1-root/usr/lib/python2.1/threading.py", line 366, in run  
    apply(self.__target, self.__args, self.__kwargs)
  File "/var/tmp/python-2.1-root/usr/lib/python2.1/SocketServer.py", line 246, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/var/tmp/python-2.1-root/usr/lib/python2.1/SocketServer.py", line 494, in __init__
    self.setup()
  File "/var/tmp/python-2.1-root/usr/lib/python2.1/SocketServer.py", line 537, in setup
    self.rfile = self.connection.makefile('rb', self.rbufsize)
error: (9, 'Bad file descriptor')

Thanks!!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]




More information about the Python-list mailing list