2
0
mirror of https://github.com/soheilhy/cmux.git synced 2024-11-10 03:31:52 +08:00

Merge pull request #6 from emosbaugh/flag_parse_in_library

rely on project to call flag.Parse rather than when used as library
This commit is contained in:
Soheil Hassas Yeganeh 2016-02-20 13:50:53 -05:00
commit 345ba38c5f

View File

@ -1,7 +1,6 @@
package cmux package cmux
import ( import (
"flag"
"fmt" "fmt"
"io" "io"
"net" "net"
@ -40,10 +39,6 @@ var (
// New instantiates a new connection multiplexer. // New instantiates a new connection multiplexer.
func New(l net.Listener) CMux { func New(l net.Listener) CMux {
if !flag.Parsed() {
flag.Parse()
}
return &cMux{ return &cMux{
root: l, root: l,
bufLen: 1024, bufLen: 1024,