I've noticed that 
if I try to connect via php by sqlrcon_alloc  to fake ip address or to anywhere where even sqlrelay is not installed or to sqlrelay with wrong connection string to db  - i.e. to anywhere it will get error to connect.
The sqlrcon_alloc return resource.

$connect = sqlrcon_alloc(''",$port,"",$username,$passwd,$retryTime,$tries);
// above resource
// error is empty

and the error appear after first sql-request.

So it seems like there is lazy connection.

Is it possible to avoid that?