Set keep-alive on socket
Fix restores