pinecone icon indicating copy to clipboard operation
pinecone copied to clipboard

Implement (*SessionProtocol).Close()

Open 0x1a8510f2 opened this issue 3 years ago • 3 comments

I noticed that a HTTP server listening on pinecone cannot be gracefully shut down or restarted because pinecone does not implement the Close() method of net.Listener.

This PR also includes a minor tweak and deps updates detailed below:

  • d31752ec1cf7630fddb91a6eb974b599e75b8794: Edit a log line left over from before the utp -> QUIC switch.
  • fc6bc1056ecacfe16214491e8dea8dcb2ddce602: Actually implement the Close() method.
  • c5f994c9360a2922576223e9924ea32547f58aed: It seems as though calling Shutdown() on a HTTP server actually closes the listener twice (here and here) so this needs to be handled. Not sure if this is working as intended or an stdlib bug.
  • a38ec944325fd171da9fa0c1d525b7af84a2301f: Update dependencies and run go mod tidy. I did this because trying to use a newer version of quic-go in my project than that used by pinecone causes segfaults. Feel free to leave the commit out. Just didn't think it warranted a separate PR. Didn't seem to cause any issues in my testing.

Signed-off-by: 0x1a8510f2 <[email protected]>

0x1a8510f2 avatar Jul 23 '22 15:07 0x1a8510f2

Hm, looks like CI is unhappy.

neilalexander avatar Jul 27 '22 13:07 neilalexander

Strange. I'm sure I tested this. Anyway, I'm currently on holiday but will take a look soon.

0x1a8510f2 avatar Jul 27 '22 15:07 0x1a8510f2

Found the problem: https://github.com/lucas-clemente/quic-go/commit/e71c236232cad376b84f330cb521350f5ce8f4f3

Fixed in b90247a3a074b709a3bde33c1a941471c372290c :D

Turns out I tested the wrong thing :P

0x1a8510f2 avatar Jul 31 '22 00:07 0x1a8510f2