Skip to content

Commit

Permalink
update:fix nil point panic
Browse files Browse the repository at this point in the history
  • Loading branch information
IoTServ committed Sep 1, 2020
1 parent 255913e commit 16f41d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/serverSession.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (ss *ServerSession) LoopStream() {
}
}()
for {
if ss.session == nil {
log.Println("ss.session is nil:")
break
}
// Accept a stream
stream, err := ss.session.AcceptStream()
if err != nil {
Expand Down

0 comments on commit 16f41d8

Please sign in to comment.