moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 187 forks source link

Multiplexer: handle data after EOF #453

Closed djs55 closed 5 years ago

djs55 commented 5 years ago

Previously it was possible for a client to send a Data payload after a Shutdown or Close which would break the Go multiplexer's main loop, because it would get EOF from io.CopyN. This PR handles this error by discarding the unexpected data and processing the next message.

To make the code clearer this PR also