BasePort: fix isConnected() when no socket are attached
Merge pull request #233 from djdeath/fix-exception-isconnected

BasePort: fix isConnected() when no socket are attached