profile
viewpoint

orjail/orjail 82

a more secure way to force programs to exclusively use tor network

gibix/aom-rs 0

Rust bindings to libaom

gibix/arduino-create-agent 0

The Arduino Create Multi Platform Agent

gibix/arduino-mqtt 0

MQTT library for Arduino based on the Eclipse Paho projects

gibix/ave 0

Audio-Video Encoder

gibix/barnard 0

barnard is a terminal-based client for the Mumble voice chat software

gibix/cargo 0

The Rust package manager

issue openedvalyala/fasthttp

[Bug/Question] Client disconnection notifier on server

I would like to be notified when the connection has been closed by the client on a long running event.

expected

func GetBigFile(ctx *fasthttp.RequestCtx) {
	ctx.SendFile("/path")

	go func () {
		select {
		case <-ctx.Done():
			fmt.Println("The client has disconnected, do something")
		}
	}()
}

I wrote a small workaround with epool on the file descriptor to detect the closing event, but could be useful to have a convenient api for this.

created time in 2 months

more