givesuse IO::Socket::SSL; my $client = IO::Socket::SSL->new('host_atlas:1024') or die "error=$!, ssl_error=$SSL_ERROR"; print 'done';
>perl test.pl
done%
givesuse Mojo::IOLoop::Client; my $client = Mojo::IOLoop::Client->new; $client->on(connect => sub ($client, $handle) {print "on_connect\n"}); $client->on(error => sub ($client, $err) {print "on_error\n"}); $client->connect({address => 'host_atlas', port => 1024}); $client->reactor->start unless $client->reactor->is_running; print 'done';
>perl test.pl -- Emit connect in Mojo::IOLoop::Client (1) on_connect done%
givesuse feature 'state'; use Mango; use Mojo::IOLoop::Client; my $connect_string=$ARGV[0]; sub mango { state $m = Mango->new($connect_string);} mango->db('mydb')->list_collections(sub { my ($db, $err, $cursor) = @_; print "YESSSSSSSSSSS !!!!\n"; }); Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
>perl test.pl "$ATLAS_STRING" -- Emit connect in Mojo::IOLoop::Client (1) -- Emit write in Mojo::IOLoop::Stream (0) -- Emit drain in Mojo::IOLoop::Stream (0) -- Emit close in Mojo::IOLoop::Stream (2) -- Emit error in Mojo::Reactor::Poll (1) Mojo::Reactor::Poll: I/O watcher failed: Can't use an undefined value as an ARRAY reference at /var/..../local/lib/perl5/Mango/Cursor.pm line 11. done%
In reply to Re^2: Mojolicious connection to Atlas ssl cluster fails: "Premature connection close"
by jjmoka
in thread Mojolicious connection to Atlas ssl cluster fails: "Premature connection close"
by jjmoka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |