Prevent registering on a closed selector. Fixes #27
Merge pull request #29 from brainopia/master

Prevent registering on a closed selector. Fixes #27