Socket connection disconnects immediately on mobile

I got the above error from the browserstack emulator, so actually the network socket data on an iPhone device is like this.

Error message:
The operation couldn’t be completed. Software caused connection abort

If I put the application in the background on mobile and open the application again after 10-15-20 seconds, the direct socket connection is disconnected and it gives the above error.

My configuration settings are like this, but it does not see these values.

socket.ping_period_ms = 60000
socket.pong_wait_ms = 75000

Do you mean immediately or when the application is put in background?
By default, on mobile operating systems, when an app goes into background the operating system will close the network connection. You will need to recreate it when it comes back to foreground.