Message1719

Author rluse
Recipients
Date 2007-07-15.08:37:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When attempting to bind to an in use port, the error message is Permission Denied, which I think is misleading.  I would recommend that Jython use the same Message the Python uses "Port already in use".

You can create the problem by running the following simple script twice:


import select
import socket
import sys

host = ''
port = 50000
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((host,port))
server.listen(5)
server.setblocking(False)
input = [server]


running = True
while running:
    inputready,outputready,exceptready = \ select.select(input,[],[])
    
    time.sleep(0.01)

The second time you run it, it will say permission denied.
History
Date User Action Args
2008-02-20 17:17:53adminlinkissue1754240 messages
2008-02-20 17:17:53admincreate