Fixed crash if no network is available.
Merge pull request #7 from zhangao0086/1.0.3

Fixed crash if no network is available.