Show 'Waiting for opponent' message

This commit is contained in:
Trevor Slocum 2020-08-16 16:35:51 -07:00
parent e16d9f368b
commit a3f41edc26
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,8 @@ func handleWrite(c *websocket.Conn) {
}
func connect(address string) {
setStatusText("Connecting...")
interrupt := make(chan struct{})
// TODO use interrupt
@ -72,6 +74,8 @@ func connect(address string) {
go handleWrite(c)
setStatusText("Waiting for opponent...")
go func() {
defer close(done)
for {