DESCRIPTION

Make sure a selector isn't canceled before reading it

If a selector is canceled then isReadable will throw an exception.
To avoid this exception and do the right thing make sure that the
selector is valid before checking if it is readable.

Change-Id: If3f9542e371eaeddf2bdea05b14b6d7263803e6a


COMMENTS

author: Kenny Maynard
date: 2011-06-09 21:02:46.665000000

Patch Set 1: Verified



-------------------------------------
author: Andreas Short
date: 2011-06-10 22:07:03.660000000

Patch Set 1: Looks good to me, approved

did you hit this exception?  looks good to me,though I wonder if we can get by with one of the two.

-------------------------------------
author: Kenny Maynard
date: 2011-06-12 01:25:33.749000000

Patch Set 1:

@Matt. I would rather leave the check in there on both if statements since we the selector could go bad after we handle reads and before we handle writes.

-------------------------------------
author: Kenny Maynard
date: 2011-06-12 01:25:33.974000000

Change has been successfully cherry-picked as 0e5c16c3e79d21beefda0cef6601022866943845.

-------------------------------------
