Skip to content

Commit

Permalink
Merge 013211a into cc7ff6c
Browse files Browse the repository at this point in the history
  • Loading branch information
vartanbeno committed Jan 23, 2020
2 parents cc7ff6c + 013211a commit 265489c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ module.exports = function (playerOptions, ensureAuthHeaders, self) {
});

socket.on('error', (err) => {
err = JSON.parse(err);
try {
err = JSON.parse(err);
} catch (e) {
err = e;
}
socketEventSubscriber.emit('error', err);

if (err.code === AUTH_ERROR) {
if (err.code === AUTH_ERROR) {
socket.disconnect();

// reconnect if failed during authorization
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playnetwork-sdk",
"version": "1.4.7",
"version": "1.4.8",
"contributors": [
{
"name": "Joshua Thomas",
Expand Down

0 comments on commit 265489c

Please sign in to comment.