Skip to content

Commit a0aa25f

Browse files
committed
Update
1 parent 626bf3e commit a0aa25f

File tree

1 file changed

+2
-2
lines changed
  • examples/socket/tcp_textproto_pipeline

1 file changed

+2
-2
lines changed

examples/socket/tcp_textproto_pipeline/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func runClient() error {
194194
}
195195

196196
func send(conn net.Conn, tpConn *textproto.Conn, msg string) error {
197-
err := conn.SetReadDeadline(time.Now().Add(1 * time.Second))
197+
err := conn.SetWriteDeadline(time.Now().Add(1 * time.Second))
198198
if err != nil {
199199
return err
200200
}
@@ -209,7 +209,7 @@ func send(conn net.Conn, tpConn *textproto.Conn, msg string) error {
209209
}
210210

211211
func recv(conn net.Conn, tpConn *textproto.Conn) error {
212-
err := conn.SetWriteDeadline(time.Now().Add(1 * time.Second))
212+
err := conn.SetReadDeadline(time.Now().Add(1 * time.Second))
213213
if err != nil {
214214
return err
215215
}

0 commit comments

Comments
 (0)