lemonade-command / lemonade

Lemonade is a remote utility tool. (copy, paste and open browser) over TCP.
MIT License
627 stars 54 forks source link

feature: add rpc timeout #38

Closed 9547 closed 3 years ago

9547 commented 3 years ago

Add RPC timeout

mattn commented 3 years ago

Thanks your contribution. I prefer to use NewClient.

conn, err := net.DialTimeout("tcp", "localhost:8080", time.Minute)
if err != nil {
    return err
}
c = rpc.NewClient(conn)
9547 commented 3 years ago

Thanks your contribution. I prefer to use NewClient.

conn, err := net.DialTimeout("tcp", "localhost:8080", time.Minute)
if err != nil {
    return err
}
c = rpc.NewClient(conn)

Thanks for your advice, fixed.

mattn commented 3 years ago

Thank you