Skip to content

Commit

Permalink
fix travis build for go 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jim3ma committed Aug 27, 2017
1 parent c17b2c3 commit 4b1c08a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- 1.8
- 1.9
- tip

matrix:
Expand Down
4 changes: 2 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewCCID(clientID ClientID, connID uint32) (cc CCID) {

// ClientID return client id
func (cc CCID) ClientID() ClientID {
return ClientID(uint32(cc >> 32))
return uint32(cc >> 32)
}

// ConnID return connection id
Expand Down Expand Up @@ -71,7 +71,7 @@ func NewConnManager() *ConnManager {

d := make([]byte, 4)
rand.Read(d)
clientID := ClientID(binary.LittleEndian.Uint32(d))
clientID := binary.LittleEndian.Uint32(d)

return &ConnManager{
clientID: clientID,
Expand Down
2 changes: 1 addition & 1 deletion meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func EmbedClientIDHeaderToPayload(gf *GotaFrame) {
}

func ParseClientIDHeaderFromPayload(gf *GotaFrame) {
client := ClientID(binary.LittleEndian.Uint32(gf.Payload[:4]))
client := binary.LittleEndian.Uint32(gf.Payload[:4])

gf.Payload = gf.Payload[4:]
gf.Length -= 4
Expand Down

0 comments on commit 4b1c08a

Please sign in to comment.