dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

socket.error: [Errno 48] Address already in use #30

Closed davisville-ntm closed 8 years ago

davisville-ntm commented 8 years ago

Running: https://github.com/dpallot/simple-websocket-server/blob/master/SimpleWebSocketServer/SimpleExampleServer.py

socket.error: [Errno 48] Address already in use

I get this error after every time I stop (ctrl + z) and restart (python SimpleExampleServer.py). I have to use a new port for every run. Am I doing something wrong? Is the socket not being removed correctly?

I have checked that Python is not still running in the force quit applications window.

davisville-ntm commented 8 years ago

"Control+Z is used for suspending a process by sending it the signal SIGSTOP, which cannot be intercepted by the program. While Control+C is used to kill a process with the signal SIGINT, and can be intercepted by a program so it can clean its self up before exiting, or not exit at all."

http://superuser.com/questions/262942/whats-different-between-ctrlz-and-ctrlc-in-unix-command-line