on-internet
← Community

Python: [WinError 10054] An existing connection was forcibly closed by the remote host

Stack Overflow ·

I'm creating a client to server based chat client and every time I setup a server and a client, the server keeps listening for a connection and when the client attempts to connect this error appears [WinError 10054] An existing connection was forcibly closed by the remote host, however the server still listens for a connection. I'm using python version 3.6.1 Script import socket import threading clients = [] s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) mode = input("Enter 1 for server mode and enter 2 for client mode") if mode == "1": def get_ip(): try: stest = socket.socket(socket.AF_

Comments

Sign in or sign up to comment and upvote.

No comments yet.