Skip to content

Commit

Permalink
#1 panic in xmeye
Browse files Browse the repository at this point in the history
  • Loading branch information
kihamo committed Oct 15, 2019
1 parent 0c4859f commit 96484ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions providers/xmeye/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ func (c *connection) SessionID() uint32 {
return atomic.LoadUint32(&c.sessionID)
}

func (c *connection) SessionIDAsString() string {
func (c *connection) SessionIDAsString() (id string) {
session := Uint32(c.SessionID())
b, _ := session.MarshalJSON()

return string(b)
if b, err := session.MarshalJSON(); err != nil {
id = string(b)
}

return id
}

func (c *connection) SetSessionID(id uint32) {
Expand Down

0 comments on commit 96484ef

Please sign in to comment.