fix repeat to create database connection

`ping()` return type is error
Merge pull request #3 from lowstz/patch-1

fix repeat to create database connection