closing sockets

M

Mohammed Smadi

hi;

i am executing program whcih uses a tcp socket. At the end of the program
i do s.close() where s is my socket.

when i try to run the program again right away i get the following error
Traceback (most recent call last):
File "asterisk_login.py", line 14, in ?
s.bind(("", hp_port)) # do some error checking
File "<string>", line 1, in bind
socket.error: (98, 'Address already in use')

how can i get around that

thanks
smadi
 
G

Grant Edwards

hi;

i am executing program whcih uses a tcp socket. At the end of the program
i do s.close() where s is my socket.

when i try to run the program again right away i get the following error
Traceback (most recent call last):
File "asterisk_login.py", line 14, in ?
s.bind(("", hp_port)) # do some error checking
File "<string>", line 1, in bind
socket.error: (98, 'Address already in use')

how can i get around that

http://www.google.com/search?hl=en&q=socket.error:+(98,+'Address+already+in+use')&btnG=Google+Search

The first hit has this link which explains it very well:

http://hea-www.harvard.edu/~fine/Tech/addrinuse.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

creating RAW sockets 6
Pickling over a socket 13
Receive packet using socket 2
array/list of sockets 13
socket programming 8
ulimit on open sockets ? 6
Python, Windows, and file sockets 0
strange sockets 8

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,145
Latest member
web3PRAgeency
Top