fix flaky server tests

ref #65
This commit is contained in:
Lucas Clemente
2016-05-09 17:50:13 +02:00
parent 476acc2966
commit b42bad8481
4 changed files with 76 additions and 77 deletions

View File

@@ -31,7 +31,7 @@ var (
type StreamCallback func(*Session, utils.Stream)
// CloseCallback is called when a session is closed
type CloseCallback func(*Session)
type CloseCallback func(id protocol.ConnectionID)
// A Session is a QUIC session
type Session struct {
@@ -313,7 +313,7 @@ func (s *Session) Close(e error, sendConnectionClose bool) error {
s.closed = true
s.closeChan <- struct{}{}
s.closeCallback(s)
s.closeCallback(s.connectionID)
if !sendConnectionClose {
return nil