Skip to content

Commit

Permalink
code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
avivklas committed Jun 20, 2019
1 parent 76d13d1 commit 06bb299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ func (s *session) Serve() error {
return err
}

switch msg.(type) {
switch v := msg.(type) {
case *pgproto3.Terminate:
s.Conn.Close()
return nil // client terminated intentionally
case *pgproto3.Query:
q := &query{
transport: t,
sql: msg.(*pgproto3.Query).String,
sql: v.String,
queryer: s.Server,
execer: s.Server,
}
Expand Down

0 comments on commit 06bb299

Please sign in to comment.