Skip to content

Commit ed1c2eb

Browse files
author
yury
committed
Mark session as initialized before auth
1 parent ba06baa commit ed1c2eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sess.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ func (s *session) Serve() error {
9292
return err
9393
}
9494

95+
s.initialized = true
96+
9597
// handle authentication.
9698
err = s.Write(authOKMsg())
9799
if err != nil {
@@ -118,7 +120,6 @@ func (s *session) Serve() error {
118120
}
119121

120122
// query-cycle
121-
s.initialized = true
122123
for {
123124
// notify the client that we're ready for more messages.
124125
err = s.Write(readyMsg())

0 commit comments

Comments
 (0)