---
title: "Problem with delay"
url: "https://maker.wiznet.io/forum/13655"
markdown_url: "https://maker.wiznet.io/forum/13655/md"
type: "Forum topic"
category: "Wireless"
author: "lentec"
created: "2020-01-16T19:16:20+09:00"
last_activity: "2020-01-20T23:21:38+09:00"
language: "en"
views: 479
replies: 3
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Problem with delay

## Question

Asked by lentec on 2020-01-16 in Wireless.

I have a server on linux or iphone and a client on Wizfi310. First I connet correctly to the server. Then I am closing connection by server (i am stopping the netcat aplication or my application on iphone). I obtain DISCONNECT command from WizFi310. Then I am opening the socket on the client (WizFi310). Next I start the server (after 10 seconds) and I have to wait about 50 seconds on the connection. This is very long time, too long. When I start first time the communication or after e.g. 10 minuts, I wait only 2-3 seconds.
I have not such problem on the server on Windows. Everything works good on Windows (I always wait only 2-3 seconds).

Below I show the responses of WizFi310 and informations about the problem.

How to solve this problem? I need to wait only 2-3 seconds on server.

![problem](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d4e9bde12466f14f1b48a0fd7988258fefd4f73d.png)

## Replies

### Reply 1 by wizdaniel, 2020-01-20

Hi lentec

which FW version you use?
I will try to test it and let you know.

### Reply 2 by lentec, 2020-01-20

Hi,
I think, that we have found today the problem and solution. The problem is number of local port in SCON instruction. If we set 0 (random port), then we have not the delay (on the picture it is 5001). Linux and iPhone do a delay after closing socket.

Thank you for help.

### Reply 3 by wizdaniel, 2020-01-20 (in reply to reply 2)

![:grinning:](https://emoji.discourse-cdn.com/twitter/grinning.png?v=12)

---

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