NSConnection ignores setRequestTimeout: on first request
NSConnection ignores setRequestTimeout: on first request
- Subject: NSConnection ignores setRequestTimeout: on first request
- From: "Michael C. Silva" <email@hidden>
- Date: Thu, 24 Sep 2009 12:59:11 -0400
I'm using NSConnections (based on NSSocketPorts) for distributed
object communications. We just Bonjour to publish NSConnection server
availability on the network.
However, if you just disconnect the ethernet from the server machine
the Bonjour publish 'lingers' for a bit on the client machine ( this
is 'ok' for now).
This leads to a case where our client may try to initiate a new
NSConnection to the server side.
We use -[NSConnection setRequestTimeout:] to set a 10s timeout, but in
the first message case it seems to ignore this parameter and instead
gets hung up by (what I think is) the TCP SYN SENT timeout (60+seconds).
This seems like a problem in NSConnection to me.
Is there a workaround? I've tried using setsockopt for the TCP
TCP_CONN_ABORT_THRESHOLD and TCP_CONN_NOTIFY_THRESHOLD parameters, but
this seems to have no effect.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden