Skip to content

SetDeadline should only close the connection if there is an in progress Read/Write #228

@emersion

Description

@emersion

I'm using websocket.NetConn. net.Conn docs say:

A deadline is an absolute time after which I/O operations fail with a timeout (see type Error) instead of blocking.

However this closes the connection 10s after the write, even if the write has already completed:

conn.SetWriteDeadline(time.Now().Add(10 * time.Second)
conn.Write([]byte("hello world"))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy