no TCP connection by WLAN from

Hello
I have a TCP connection to a PLC via Wi-Fi. When night is the Wi-Fi is set up for 5 hours of the next day no TCP connection to the PLC. On the Linux side switches off irgent something.

If I turn off the Wi-Fi only briefly I get re pure connection to the PLC

Can anyone tell me how I can change this?

Does anyone have a solution for the WIFI problem?

If your Yun setup as dhcp client, then might be dhcp Address Lease Time from upstream device (router)
default time out is 120 minutes/ 2 hours.

http://forum.arduino.cc/index.php?topic=203754.msg1514529#msg1514529

Plan A:
Add

route add -net 0.0.0.0/0 gw "$i"

at

/lib/netifd/dhcp.script

http://forum.arduino.cc/index.php?topic=203754.msg1507343#msg1507343

Plan B:

Set up Yun as static IP address.

Hello Variant 1 has not resolved my problem

setup_interface () {
        proto_init_update "*" 1
        proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
        # TODO: apply $broadcast

        for i in $router; do
                proto_add_ipv4_route 0.0.0.0 0 "$i"
                route add -net 0.0.0.0/0 gw "$i"
        done

I try to use version 2

The problem was not resolved.
There is no automatic TCP connection to the PLC when the WLAN is for an extended period.

Where can I find the time when the WLAN is adjustable from?