---
title: "Error: Invalid socket status for socket operation. Can anyone help?"
url: "https://maker.wiznet.io/forum/13746"
markdown_url: "https://maker.wiznet.io/forum/13746/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "ImHang"
created: "2020-03-17T08:23:52+09:00"
last_activity: "2020-03-18T04:04:27+09:00"
language: "en"
views: 843
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Error: Invalid socket status for socket operation. Can anyone help?

## Question

Asked by ImHang on 2020-03-17 in Ethernet Chips.

Hi everyone. I’m using module W5500 to upload file to server via FTP protocol. I used library from the manufacturer on their website. As you can see from the picture below, each communication step between client and server is successful, except the last step. When client send the “QUIT” command, server responsed 220 code (close the connection) but the client received error (*SOCKERR_SOCKSTATUS (SOCK_ERROR - 7) ///&lt; Invalid socket status for socket operation* in file **Socket.h**). I don’t know why this happened. I’m looking for your answers. Thank you so much.

[![FTP Package_Wireshark](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/5/57be990e4552f77525ee89413694ccb7305d36fd.jpeg) FTP Package_Wireshark1277×342 139 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/5/57be990e4552f77525ee89413694ccb7305d36fd.jpeg)

## Replies

### Reply 1 by becky, 2020-03-17

It seems that the problem was caused by closing the socket due to the RST packet sent by the server before the message processing of the 220 code received from the server was completed.
I will check more and reply again.

### Reply 2 by ImHang, 2020-03-18 (in reply to reply 1)

Thanks for your reply. I noticed that there was a RST packet from the server but I dont know what its mean. This is the project I run successfully from a few month ago, and now when I run again, it becomes error like this.

---

Source: https://maker.wiznet.io/forum/13746
