Skip to content

Commit

Permalink
+ Fix issues with Thin Peer.
Browse files Browse the repository at this point in the history
  • Loading branch information
THORCOMP committed Jun 8, 2022
1 parent 76d924a commit 196859c
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions lib/API/Eulerian/EDW/Peer/Thin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use strict; use warnings;
#
# Inherited interface from API::Eulerian::EDW::Peer
#
use parent 'API::Eulerian::EDW::Peer';
use API::Eulerian::EDW::Peer;
#
# Import API::Eulerian::EDW::WebSocket
#
Expand All @@ -44,6 +44,18 @@ use Switch;
#
use JSON;
#
#
#
use API::Eulerian::EDW::Authority();
#
#
#
use Encode;
#
#
#
our @ISA = qw/ API::Eulerian::EDW::Peer /;
#
# @brief Allocate and initialize a new Eulerian Data Warehouse Thin Peer.
#
# @param $class - Eulerian Data Warehouse Thin Peer class.
Expand All @@ -53,11 +65,10 @@ use JSON;
#
sub new
{
my ( $class, $setup ) = @_;
my $self;

# Call base instance constructor
$self = $class->SUPER::create( 'API::Eulerian::EDW::Peer::Thin' );
my $proto = shift;
my $class = ref( $proto ) || $proto;
my $setup = shift() || {};
my $self = $class->SUPER::new();

# Setup Default host value
$self->host( 'edwaro' );
Expand All @@ -68,7 +79,7 @@ sub new
# Setup Rest Peer Attributes
$self->setup( $setup );

return $self;
return bless( $self, $class );
}
#
# @brief Setup Eulerian Data Warehouse Peer.
Expand Down Expand Up @@ -167,6 +178,7 @@ sub create
sub dispatcher
{
my ( $ws, $buf ) = @_;
$buf = encode( 'utf-8', $buf );
my $json = decode_json( $buf );
my $type = $json->{ message };
my $uuid = $json->{ uuid };
Expand Down

0 comments on commit 196859c

Please sign in to comment.