Skip to content

Commit 1b5029e

Browse files
committed
Fixed default buffer to do no pausing
If no buffer type is passed in, a default buffer is picked, which really means don't buffer at all. However, there was a bug where an artificial pause was being added due to test code not being removed. Former-commit-id: 0c524d723857ba2b71103123db8c54a4c7eae78a [formerly ec883b09f1780f076f87eef3f707197e0b558a19] Former-commit-id: cd54e6efc671325b1eacf11e53d14886fbfbc7e0
1 parent f66b2d2 commit 1b5029e

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

bufferflow_default.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package main
2+
3+
import (
4+
"log"
5+
//"regexp"
6+
//"strconv"
7+
//"time"
8+
)
9+
10+
type BufferflowDefault struct {
11+
}
12+
13+
var ()
14+
15+
func (b *BufferflowDefault) Init() {
16+
log.Println("Initting default buffer flow (which means no buffering)")
17+
}
18+
19+
func (b *BufferflowDefault) BlockUntilReady() {
20+
//log.Printf("BlockUntilReady() start\n")
21+
}
22+
23+
func (b *BufferflowDefault) OnIncomingData(data string) {
24+
//log.Printf("OnIncomingData() start. data:%v\n", data)
25+
}

hub.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func (h *hub) run() {
6666
}
6767
}
6868
case m := <-h.broadcastSys:
69-
//log.Print("Got a system broadcast")
70-
//log.Print(string(m))
69+
log.Print("Got a system broadcast")
70+
log.Print(string(m))
7171
//log.Print("-----")
7272

7373
for c := range h.connections {

serial.go.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f7c160746bc7a68236eca7dc217c4f9935ae9fb9
1+
5bb7e3df9a615ac0283ef29760ece856b1927fa2

serialport.go.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
88815166941a7461c676ab1d1a7c0d6fa5e92692
1+
f7c81f6867265cbfef8b9747b88f3ae1e9a5d8f4

0 commit comments

Comments
 (0)