Python [Errno 98] Address already in use

前端 未结 9 2663
一个人的身影
一个人的身影 2020-11-27 10:35

In my Python socket program, I sometimes need to interrupt it with Ctrl-C. When I do this, it does close the connection using socket.close().

9条回答
  •  無奈伤痛
    2020-11-27 10:50

    First of all find the python process ID using this command

    ps -fA | grep python
    

    You will get a pid number by naming of your python process on second column

    Then kill the process using this command

    kill -9 pid
    

提交回复
热议问题