Skip to content

Commit

Permalink
Print debug info prior to conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
athos committed Jun 27, 2022
1 parent ab263b2 commit 110d1ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nrepl/nrepl.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ func Connect(opts *ConnOpts) (conn *Conn, err error) {
}

func (conn *Conn) Send(req client.Request) error {
msg := map[string]bencode.Datum(req.(Request))
if conn.debug {
conn.debugHandler.HandleDebugMessage(fmt.Sprintf("[DEBUG:SEND] %q\n", msg))
conn.debugHandler.HandleDebugMessage(fmt.Sprintf("[DEBUG:SEND] %q\n", req))
}
return conn.encoder.Encode(msg)
return conn.encoder.Encode(map[string]bencode.Datum(req.(Request)))
}

func (conn *Conn) Recv() (client.Response, error) {
Expand Down

0 comments on commit 110d1ef

Please sign in to comment.