enet icon indicating copy to clipboard operation
enet copied to clipboard

ENet SIGPIPE error on iOS

Open watsonsong opened this issue 11 years ago • 2 comments

I use enet on iOS, and met some error. When I connect to a server by enet, and lock the screen, the application enter background. And then I unlock the screen, the socket is closed, but no disconnect message notify. So I always met SIGPIPE error.

I think enet need notify the user all peer is disconnect in such a situation.

watsonsong avatar Jan 12 '14 11:01 watsonsong

i have the same problem. Did you managed to fix this? or any ideas for a workaround?

johann-bauer avatar Nov 15 '14 15:11 johann-bauer

This is standard iOS behavior - all sockets forcefully closed and destroyed by iOS after app goes to background. Your should handle "Background"/"Foreground" events in your app and implement destroy/reconnect. More: http://stackoverflow.com/questions/14876359/socket-connection-killed-after-ios-app-goes-to-background

pavlog avatar Nov 15 '14 15:11 pavlog