~emersion/soju#169: 
Data race when receiving NOTICE before RPL_WELCOME

Trace for soju f7e151396d78a1b63be171e03a284735829e88ee:

==================
WARNING: DATA RACE
Write at 0x00c0003ae080 by goroutine 36:
  git.sr.ht/~emersion/soju.(*user).run()
      /home/simon/src/soju/user.go:639 +0x16b1
  git.sr.ht/~emersion/soju.(*Server).addUserLocked.func1()
      /home/simon/src/soju/server.go:291 +0xc4

Previous read at 0x00c0003ae080 by goroutine 58:
  git.sr.ht/~emersion/soju.(*user).forEachDownstream()
      /home/simon/src/soju/user.go:483 +0x3e
  git.sr.ht/~emersion/soju.(*network).forEachDownstream()
      /home/simon/src/soju/user.go:156 +0x7e
  git.sr.ht/~emersion/soju.(*upstreamConn).forEachDownstream()
      /home/simon/src/soju/upstream.go:258 +0x185
  git.sr.ht/~emersion/soju.(*upstreamConn).produce()
      /home/simon/src/soju/upstream.go:2066 +0x43
  git.sr.ht/~emersion/soju.(*upstreamConn).handleMessage()
      /home/simon/src/soju/upstream.go:484 +0xafb3
  git.sr.ht/~emersion/soju.(*upstreamConn).runUntilRegistered()
      /home/simon/src/soju/upstream.go:1948 +0xa4
  git.sr.ht/~emersion/soju.(*network).run()
      /home/simon/src/soju/user.go:222 +0x8d3
  git.sr.ht/~emersion/soju.(*user).run·dwrap·40()
      /home/simon/src/soju/user.go:548 +0x39

Goroutine 36 (running) created at:
  git.sr.ht/~emersion/soju.(*Server).addUserLocked()
      /home/simon/src/soju/server.go:284 +0x29c
  git.sr.ht/~emersion/soju.(*Server).Start()
      /home/simon/src/soju/server.go:171 +0xdc
  main.main()
      /home/simon/src/soju/cmd/soju/main.go:324 +0xa84

Goroutine 58 (running) created at:
  git.sr.ht/~emersion/soju.(*user).run()
      /home/simon/src/soju/user.go:548 +0x25b3
  git.sr.ht/~emersion/soju.(*Server).addUserLocked.func1()
      /home/simon/src/soju/server.go:291 +0xc4
==================
Status
REPORTED
Submitter
~emersion
Assigned to
No-one
Submitted
6 months ago
Updated
6 months ago
Labels
bug upstream