Distributed objects + timeouts
Distributed objects + timeouts
- Subject: Distributed objects + timeouts
- From: "James Trankelson" <email@hidden>
- Date: Tue, 28 Aug 2007 03:36:58 -0400
I've an application that's using distributed objects, and (randomly)
get (some variant) of the following exception:
[NSPortCoder sendBeforeTime:sendReplyPort:] timed out
(209988086.333689 209978086.333790) 1
This happens when my client app receives a notification that it needs
to communicate with the distributed object:
@try {
id theProxy = [connection rootProxy];
[theProxy setProtocolForProxy:@protocol(SlaveProtocol)];
[theProxy loadURL:[notification object]];
}
The connection is created in the client as follows (when the service is found):
NSSocketPort *port = [[NSSocketPortNameServer sharedInstance]
portForName:@"mySlave" host:serverHostName];
connection = [[NSConnection alloc] initWithReceivePort:localPort sendPort:port];
[connection retain];
[connection setRequestTimeout:10000];
[connection setReplyTimeout:10000];
The connection is established in my server as follows:
port = [[NSSocketPort alloc] init];
connection = [[NSConnection alloc] initWithReceivePort:port sendPort:nil];
[connection setRequestTimeout:10000];
[connection setReplyTimeout:10000];
(Even *much* larger timeout values result in the same behavior.)
Sometimes, my app makes a set of requests, and all I get in response
is a bunch of the aforementioned errors. Other times, everything works
fine. Restarting either the client or server does not appear to
consistently remedy this situation.
The first question I have is what exactly is timing out here?
On a related note, if I catch this exception, how can I fix the
problem and try again?
Thanks!
-jt
_______________________________________________
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