File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -507,11 +507,6 @@ func (c *Connection) finalizer() {
507507 c .connManager .Remove (c )
508508 }
509509
510- // Close all channels associated with the connection
511- if c .msgBuffChan != nil {
512- close (c .msgBuffChan )
513- }
514-
515510 zlog .Ins ().InfoF ("Conn Stop()...ConnID = %d" , c .connID )
516511}
517512
@@ -568,15 +563,9 @@ func (c *Connection) isClosed() bool {
568563}
569564
570565func (c * Connection ) setClose () bool {
571- if atomic .CompareAndSwapInt32 (& c .closed , 0 , 1 ) {
572- return true
573- }
574- return false
566+ return atomic .CompareAndSwapInt32 (& c .closed , 0 , 1 )
575567}
576568
577569func (c * Connection ) setStartWriterFlag () bool {
578- if atomic .CompareAndSwapInt32 (& c .startWriterFlag , 0 , 1 ) {
579- return true
580- }
581- return false
570+ return atomic .CompareAndSwapInt32 (& c .startWriterFlag , 0 , 1 )
582571}
You can’t perform that action at this time.
0 commit comments