Post

Replies

Boosts

Views

Activity

Reply to NWConnection (web-socket) does not disconnect when server disconnects gracefully
@dispatchMain , @eskimo could you please explain how we handle isFinal flag? Does that always indicate that server has closed the connect? I have noticed that whenever isFinal is set to true, we also receive [connection] nw_flow_add_read_request already delivered final read, cannot accept read requests event which indicates the server has closed the connection. Which is proved by another event we receive nw_socket_handle_socket_event Socket SO_ERROR [54: Connection reset by peer] exactly after 1 minute (i'm not sure why is there a delay of exactly 1 minute) so what i'm wondering is:1. What are the cases when we want to set receive listener again and when we don't. Is isFinal: true when we don't want to listen again? Why is nw_socket_handle_socket Socket SO_ERROR event sent with 1 minute delay when server has closed the connection 1 minute ago? Any ideas?
May ’23