• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Untimely NSPortTimeoutException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Untimely NSPortTimeoutException


  • Subject: Untimely NSPortTimeoutException
  • From: j o a r <email@hidden>
  • Date: Sun, 23 Jun 2002 22:40:57 +0200

Hej,

I was just trying to see what my app would do if launched with no server running (it attempts to connect using DO over TCP). I know that the connection is not opened until first used, so I was expecting something to go wrong when I first attempted to fetch the rootProxy of the (not running) server, but I was a bit surprised with the results:

This is the interesting piece of code:
==============================================
NSLog(@"Fetching proxy of server (%f)", [serverConnection replyTimeout]);
NS_DURING
server = [[serverConnection rootProxy] retain];
NS_HANDLER
NSLog(@"localException: %@, %@", [localException name], [localException reason]);
NS_ENDHANDLER
==============================================

These are the corresponding logs:
==============================================
2002-06-23 22:31:05.460 MyApp[1736] Fetching proxy of server (10000000000.000000)
2002-06-23 22:31:05.465 MyApp[1736] localException: NSPortTimeoutException, [NSPortCoder sendBeforeTime:sendReplyPort:] timed out
==============================================

...as you can see I get the time out exception immediately. Isn't this weird? Shouldn't I get some other exception, or this exception but after the full time out? Is there some other way to detect if the remote server is up and running or not, besides this crude attempt?

j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Scroller position
  • Next by Date: Re: Scroller position
  • Previous by thread: NSFileWrapper (directory wrapper) and Document Architecture
  • Next by thread: CDSA - they really don't want anyone to use it this bad?!?
  • Index(es):
    • Date
    • Thread