Skip to content

Commit

Permalink
feat: send chan name
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov authored and jacobheun committed Feb 7, 2019
1 parent 69f3605 commit aa1dcfa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,22 @@ class Channel extends EE {
this.close(this._reset)
}

openChan () {
openChan (name) {
if (this.open) { return } // chan already open

let name
this.open = true
this._plex.push([
this._id,
consts.type.NEW,
name !== this._id.toString() ? name : null
name !== this._id.toString() ? name : this._id.toString()
])
}

sendMsg (data) {
this._log('sendMsg')

if (!this.open) {
this.openChan()
this.openChan(this.name)
}

this._plex.push([
Expand Down

0 comments on commit aa1dcfa

Please sign in to comment.