Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #58 from kpenfound/remove_crayfish_ack
Browse files Browse the repository at this point in the history
Fix: remove unimplemented crayfish ack
  • Loading branch information
nanu-c committed Aug 18, 2022
2 parents ea71697 + 3b1e257 commit df46d0b
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions crayfish/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,31 +263,6 @@ func (c *Conn) connect(originURL string) error {
return nil
}

// Send ack response message
func (c *Conn) sendAck() error {
typ := CrayfishWebSocketMessage_RESPONSE
message := ACKMessage{
Status: "ok",
}
responseType := CrayfishWebSocketResponseMessageTyp_ACK
csm := &CrayfishWebSocketMessage{
Type: &typ,
Response: &CrayfishWebSocketResponseMessage{
Type: &responseType,
Message: &message,
},
}

b, err := json.Marshal(csm)
if err != nil {
return err
}
log.Debugln("[textsecure-crayfish-ws] websocket sending ack response ")

c.send <- b
return nil
}

// write writes a message with the given message type and payload.
func (c *Conn) write(mt int, payload []byte) error {
Instance.cmd.Process.Signal(syscall.SIGCONT)
Expand Down Expand Up @@ -414,15 +389,6 @@ func (c *CrayfishInstance) StartWebsocket() error {
} else {
log.Errorln("[textsecure-crayfish-ws] failed to handle incoming websocket message")
}
if csm.Type != nil {
err = c.wsconn.sendAck()
if err != nil {
log.WithFields(log.Fields{
"error": err,
}).Error("[textsecure-crayfish-ws] Failed to send ack")
return err
}
}
}
}

Expand Down

0 comments on commit df46d0b

Please sign in to comment.