Skip to content

Commit

Permalink
Merge pull request #21 from JimiC/refactoring
Browse files Browse the repository at this point in the history
Refactor code base.
  • Loading branch information
sjmf authored Mar 16, 2017
2 parents 3a55ee3 + 284fa0f commit dc9b1ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/services/stomp/stomp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class STOMPService {
this.on_error
);

console.log('Connecting...');
this.debug('Connecting...');
this.state.next(STOMPState.TRYING);

return new Promise(
Expand Down Expand Up @@ -173,7 +173,7 @@ export class STOMPService {
public debug(...args: any[]): void {

// Push arguments to this function into console.log
if (window.console && console.log && console.log.apply) {
if (console && console.log && console.log.apply) {
console.log.apply(console, args);
}
}
Expand All @@ -182,7 +182,7 @@ export class STOMPService {
// Callback run on successfully connecting to server
public on_connect = () => {

console.log('Connected');
this.debug('Connected');

// Indicate our connected state to observers
this.state.next(STOMPState.CONNECTED);
Expand Down Expand Up @@ -217,7 +217,7 @@ export class STOMPService {
this.state.next(STOMPState.CLOSED);

// Attempt reconnection
console.log('Reconnecting in 5 seconds...');
this.debug('Reconnecting in 5 seconds...');
this.timer = setTimeout(() => {
this.configure();
this.try_connect();
Expand Down

0 comments on commit dc9b1ae

Please sign in to comment.