ing
This commit is contained in:
parent
32883be22b
commit
f5810183da
|
@ -204,6 +204,7 @@ func (c *Client) handleSend(stopChan <-chan struct{}, doneChan chan<- error, wri
|
|||
var (
|
||||
rs *requestState
|
||||
id interface{}
|
||||
messageType int
|
||||
message []byte
|
||||
err error
|
||||
ok bool
|
||||
|
@ -233,7 +234,7 @@ LOOP:
|
|||
if 0 < rs.id {
|
||||
id = rs.id
|
||||
}
|
||||
message, err = c.ClientHandler.GetRPCCodec().NewRequest(rs.method, rs.params, id)
|
||||
messageType, message, err = c.ClientHandler.GetRPCCodec().NewRequest(rs.method, rs.params, id)
|
||||
if nil != err {
|
||||
rs.setError(err)
|
||||
rs.done()
|
||||
|
@ -241,7 +242,7 @@ LOOP:
|
|||
}
|
||||
|
||||
select {
|
||||
case writeChan <- css.MakeSocketMessage(css.TextMessage, message):
|
||||
case writeChan <- css.MakeSocketMessage(messageType, message):
|
||||
default:
|
||||
rs.setError(fmt.Errorf("%s cannot send request", c.logHeader()))
|
||||
rs.done()
|
||||
|
|
Loading…
Reference in New Issue
Block a user