Skip to content

Commit

Permalink
added one condition for check last error of bind function
Browse files Browse the repository at this point in the history
  • Loading branch information
murtazokhongofurov committed Mar 5, 2024
1 parent d66ab45 commit 5e4df53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cli/jprqc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package main
import (
"encoding/binary"
"fmt"
"github.com/azimjohn/jprq/cli/debugger"
"github.com/azimjohn/jprq/server/events"
"github.com/azimjohn/jprq/server/tunnel"
"io"
"log"
"net"
"strings"
"time"

"github.com/azimjohn/jprq/cli/debugger"
"github.com/azimjohn/jprq/server/events"
"github.com/azimjohn/jprq/server/tunnel"
)

type jprqClient struct {
Expand Down Expand Up @@ -127,6 +128,9 @@ func bind(src net.Conn, dst net.Conn, debugCon io.Writer) error {
return err
}
_, err = debugCon.Write(buf[:n])
if err != nil {
return err
}
}
return nil
}
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func printVersion() {
}

func printHelp() {
fmt.Println("Usage: jprq <command> [arguments]\n")
fmt.Printf("Usage: jprq <command> [arguments]\n\n")
fmt.Println("Commands:")
fmt.Println(" auth <token> Set authentication token from jprq.io/auth")
fmt.Println(" tcp <port> Start a TCP tunnel on the specified port")
Expand Down

0 comments on commit 5e4df53

Please sign in to comment.